1#!/bin/sh 2# |
3# $FreeBSD: head/etc/rc.d/pf 197947 2009-10-10 22:17:03Z dougb $ |
4# 5 6# PROVIDE: pf 7# REQUIRE: FILESYSTEMS netif pflog pfsync 8# BEFORE: routing 9# KEYWORD: nojail 10 11. /etc/rc.subr --- 8 unchanged lines hidden (view full) --- 20resync_cmd="pf_resync" 21status_cmd="pf_status" 22extra_commands="check reload resync status" 23required_files="$pf_rules" 24required_modules="pf" 25 26pf_start() 27{ |
28 check_startmsgs && echo -n 'Enabling pf' |
29 $pf_program -F all > /dev/null 2>&1 30 $pf_program -f "$pf_rules" $pf_flags 31 if ! $pf_program -s info | grep -q "Enabled" ; then 32 $pf_program -e 33 fi |
34 check_startmsgs && echo '.' |
35} 36 37pf_stop() 38{ 39 if $pf_program -s info | grep -q "Enabled" ; then |
40 echo -n 'Disabling pf' |
41 $pf_program -d |
42 echo '.' |
43 fi 44} 45 46pf_check() 47{ 48 echo "Checking pf rules." 49 $pf_program -n -f "$pf_rules" 50} --- 22 unchanged lines hidden --- |