Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-1-5]: src/etc/rc.d Pull up revisions 1.1-1.3 (new, requested by m...



details:   https://anonhg.NetBSD.org/src/rev/0394bf43a55e
branches:  netbsd-1-5
changeset: 492928:0394bf43a55e
user:      he <he%NetBSD.org@localhost>
date:      Wed Mar 06 22:24:23 2002 +0000

description:
Pull up revisions 1.1-1.3 (new, requested by martti):
  Added ipfs to save state tables.  Use -D for ipmon.

diffstat:

 etc/rc.d/ipfs |  36 ++++++++++++++++++++++++++++++++++++
 1 files changed, 36 insertions(+), 0 deletions(-)

diffs (40 lines):

diff -r 4faf76030682 -r 0394bf43a55e etc/rc.d/ipfs
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/etc/rc.d/ipfs     Wed Mar 06 22:24:23 2002 +0000
@@ -0,0 +1,36 @@
+#!/bin/sh
+#
+# $NetBSD: ipfs,v 1.3.2.2 2002/03/06 22:24:23 he Exp $
+#
+
+# PROVIDE: ipfs
+# REQUIRE: ipnat mountcritremote
+# KEYWORD: shutdown
+
+. /etc/rc.subr
+
+name="ipfs"
+rcvar=$name
+start_cmd="ipfs_start"
+stop_cmd="ipfs_stop"
+
+ipfs_start()
+{
+       if [ -r /var/db/ipf/ipstate.ipf -a -r /var/db/ipf/ipnat.ipf ]; then
+               /usr/sbin/ipfs -R ${ipfs_flags}
+               rm -f /var/db/ipf/ipstate.ipf /var/db/ipf/ipnat.ipf
+       fi
+}
+
+ipfs_stop()
+{
+       if [ ! -d /var/db/ipf ]; then
+               mkdir /var/db/ipf
+               chmod 700 /var/db/ipf
+               chown root:wheel /var/db/ipf
+       fi
+       /usr/sbin/ipfs -W ${ipfs_flags}
+}
+
+load_rc_config $name
+run_rc_command "$1"



Home | Main Index | Thread Index | Old Index