ipfs revision 98576
1#!/bin/sh 2# 3# $NetBSD: ipfs,v 1.3 2002/02/11 13:55:42 lukem Exp $ 4# 5 6# PROVIDE: ipfs 7# REQUIRE: ipnat mountcritremote 8# KEYWORD: shutdown 9 10. /etc/rc.subr 11 12name="ipfs" 13rcvar=$name 14start_cmd="ipfs_start" 15stop_cmd="ipfs_stop" 16 17ipfs_start() 18{ 19 if [ -r /var/db/ipf/ipstate.ipf -a -r /var/db/ipf/ipnat.ipf ]; then 20 /usr/sbin/ipfs -R ${rc_flags} 21 rm -f /var/db/ipf/ipstate.ipf /var/db/ipf/ipnat.ipf 22 fi 23} 24 25ipfs_stop() 26{ 27 if [ ! -d /var/db/ipf ]; then 28 mkdir /var/db/ipf 29 chmod 700 /var/db/ipf 30 chown root:wheel /var/db/ipf 31 fi 32 /usr/sbin/ipfs -W ${rc_flags} 33} 34 35load_rc_config $name 36run_rc_command "$1" 37