pfsync revision 168283
1#!/bin/sh 2# 3# $FreeBSD: head/etc/rc.d/pfsync 168283 2007-04-02 22:53:07Z des $ 4# 5 6# PROVIDE: pfsync 7# REQUIRE: root FILESYSTEMS netif 8# KEYWORD: nojail 9 10. /etc/rc.subr 11 12name="pfsync" 13rcvar=`set_rcvar` 14start_precmd="pfsync_prestart" 15start_cmd="pfsync_start" 16stop_cmd="pfsync_stop" 17required_modules="pf" 18 19pfsync_prestart() 20{ 21 # XXX Currently pfsync cannot be a module as it must register 22 # a network protocol in a static kernel table. 23 if ! kldstat -q -m pfsync; then 24 warn "pfsync(4) must be statically compiled in the kernel." 25 return 1 26 fi 27 28 case "$pfsync_syncdev" in 29 '') 30 warn "pfsync_syncdev is not set." 31 return 1 32 ;; 33 esac 34 return 0 35} 36 37pfsync_start() 38{ 39 echo "Enabling pfsync." 40 ifconfig pfsync0 syncdev $pfsync_syncdev $pfsync_ifconfig up 41} 42 43pfsync_stop() 44{ 45 echo "Disabling pfsync." 46 ifconfig pfsync0 -syncdev down 47} 48 49load_rc_config $name 50run_rc_command "$1" 51