Lines 23-33
extra_commands="check reload resync"
Link Here
|
23 |
required_files="$pf_rules" |
23 |
required_files="$pf_rules" |
24 |
required_modules="pf" |
24 |
required_modules="pf" |
25 |
|
25 |
|
|
|
26 |
pf_fallback() |
27 |
{ |
28 |
if ! checkyesno pf_fallback_rules_enable; then |
29 |
return |
30 |
fi |
31 |
|
32 |
warn "Unable to load $pf_rules." |
33 |
if [ -f $pf_fallback_rules_file ]; then |
34 |
warn "Loading fallback rules file: $pf_fallback_rules_file" |
35 |
$pf_program -f $pf_fallback_rules_file $pf_flags |
36 |
else |
37 |
warn "Loading fallback rules: $pf_fallback_rules" |
38 |
echo -e $pf_fallback_rules | $pf_program -f - $pf_flags |
39 |
fi |
40 |
} |
41 |
|
26 |
pf_start() |
42 |
pf_start() |
27 |
{ |
43 |
{ |
28 |
check_startmsgs && echo -n 'Enabling pf' |
44 |
check_startmsgs && echo -n 'Enabling pf' |
29 |
$pf_program -F all > /dev/null 2>&1 |
45 |
$pf_program -F all > /dev/null 2>&1 |
30 |
$pf_program -f "$pf_rules" $pf_flags |
46 |
if ! $pf_program -f "$pf_rules" $pf_flags ; then |
|
|
47 |
pf_fallback |
48 |
fi |
31 |
if ! $pf_program -s info | grep -q "Enabled" ; then |
49 |
if ! $pf_program -s info | grep -q "Enabled" ; then |
32 |
$pf_program -eq |
50 |
$pf_program -eq |
33 |
fi |
51 |
fi |