3 # $NetBSD: ipfs,v 1.3 2002/02/11 13:55:42 lukem Exp $
4 # $FreeBSD: src/etc/rc.d/ipfs,v 1.2 2003/04/24 08:20:47 mtm Exp $
5 # $DragonFly: src/etc/rc.d/ipfs,v 1.4 2005/11/19 22:47:32 swildner Exp $
17 start_cmd
="ipfs_start"
19 start_precmd
="ipfs_prestart"
23 # Do not continue if either ipnat or ipfilter is not enabled or
24 # if the ipfilter module is not loaded.
26 if ! checkyesno ipfilter_enable
-o ! checkyesno ipnat_enable
; then
27 err
1 "${name} requires either ipfilter or ipnat enabled"
29 if ! sysctl net.inet.ipf.fr_pass
>/dev
/null
2>&1; then
30 err
1 "ipfilter module is not loaded"
37 if [ -r /var
/db
/ipf
/ipstate.ipf
-a -r /var
/db
/ipf
/ipnat.ipf
]; then
38 ${ipfs_program} -R ${rc_flags}
39 rm -f /var
/db
/ipf
/ipstate.ipf
/var
/db
/ipf
/ipnat.ipf
45 if [ ! -d /var
/db
/ipf
]; then
48 chown root
:wheel
/var
/db
/ipf
50 ${ipfs_program} -W ${rc_flags}