Lines 29-35
Link Here
|
29 |
{ |
29 |
{ |
30 |
check_startmsgs && echo -n 'Enabling pf' |
30 |
check_startmsgs && echo -n 'Enabling pf' |
31 |
$pf_program -F all > /dev/null 2>&1 |
31 |
$pf_program -F all > /dev/null 2>&1 |
32 |
$pf_program -f "$pf_rules" $pf_flags |
32 |
if ! $pf_program -f "$pf_rules" $pf_flags ; then |
|
|
33 |
if checkyesno pf_default_rules_enable; then |
34 |
warn "Unable to load $pf_rules and pf_default_rules_enable is set to YES." |
35 |
if [ -f $pf_default_rules_file ]; then |
36 |
warn "Loading pf_default_rules_file: $pf_default_rules_file" |
37 |
$pf_program -f $pf_default_rules_file $pf_flags |
38 |
else |
39 |
warn "pf_default_rules_file $pf_default_rules_file not found, loading pf_default_rules: $pf_default_rules" |
40 |
echo -e $pf_default_rules | $pf_program -f - $pf_flags |
41 |
fi |
42 |
else |
43 |
warn "Unable to load $pf_rules and pf_default_rules_enable is NO." |
44 |
warn "No pf rules are loaded, this means all traffic is permitted." |
45 |
fi |
46 |
fi |
33 |
if ! $pf_program -s info | grep -q "Enabled" ; then |
47 |
if ! $pf_program -s info | grep -q "Enabled" ; then |
34 |
$pf_program -eq |
48 |
$pf_program -eq |
35 |
fi |
49 |
fi |