]> arthur.barton.de Git - netatalk.git/commitdiff
Back-port from trunk: NetBSD init scripts.
authorsrittau <srittau>
Thu, 7 Feb 2002 23:39:20 +0000 (23:39 +0000)
committersrittau <srittau>
Thu, 7 Feb 2002 23:39:20 +0000 (23:39 +0000)
distrib/initscripts/Makefile.am
distrib/initscripts/rc.afpd.netbsd.tmpl [new file with mode: 0644]
distrib/initscripts/rc.atalkd.netbsd.tmpl [new file with mode: 0644]
distrib/initscripts/rc.papd.netbsd.tmpl [new file with mode: 0644]
distrib/initscripts/rc.timelord.netbsd.tmpl [new file with mode: 0644]

index 2a46bf6ef795bbf8e9023a7010454e2f4ef5a5f1..76534607210df1fcc971189b6a7e5fba8fdcc731 100644 (file)
@@ -15,10 +15,14 @@ pkgconfdir = @PKGCONFDIR@
            <$< >$@
 
 GENERATED_FILES = \
+       rc.afpd.netbsd          \
        rc.atalk.redhat         \
        rc.atalk.tru64          \
        rc.atalk.bsd            \
-       rc.atalk.suse
+       rc.atalkd.netbsd        \
+       rc.atalk.suse           \
+       rc.papd.netbsd          \
+       rc.timelord.netbsd
 TEMPLATES = $(foreach f,$(GENERATED_FILES),$(f).tmpl)
 
 CLEANFILES = $(GENERATED_FILES)
@@ -86,3 +90,30 @@ atalk: rc.atalk.tru64
        chmod a+x atalk
 
 endif
+
+#
+# checking for NetBSD init scripts
+#
+
+if USE_NETBSD
+
+sysvdir = /etc/rc.d
+sysv_SCRIPTS = afp atalk pap timelord
+
+afpd: rc.afpd.netbsd
+       cp -f $< $@
+
+atalkd: rc.atalkd.netbsd
+       cp -f $< $@
+       chmod a+x $@
+
+papd: rc.papd.netbsd
+       cp -f $< $@
+       chmod a+x $@
+
+timelord: rc.timelord.netbsd
+       cp -f $< $@
+       chmod a+x $@
+
+endif
+
diff --git a/distrib/initscripts/rc.afpd.netbsd.tmpl b/distrib/initscripts/rc.afpd.netbsd.tmpl
new file mode 100644 (file)
index 0000000..7f28907
--- /dev/null
@@ -0,0 +1,22 @@
+#!/bin/sh
+#
+# PROVIDE: afpd
+# REQUIRE: atalkd
+#
+# AppleTalk daemons. Make sure not to start atalkd in the background:
+# its data structures must have time to stablize before running the
+# other processes.
+#
+
+. /etc/rc.subr
+
+name="afpd"
+rcvar=$name
+command=":SBINDIR:/afpd"
+etcdir=":ETCDIR:"
+pidfile="/var/run/${name}.pid"
+required_files="$etcdir/papd.conf $etcdir/AppleVolumes.default $etcdir/AppleVolumes.system"
+
+load_rc_config $name
+run_rc_command "$1"
+
diff --git a/distrib/initscripts/rc.atalkd.netbsd.tmpl b/distrib/initscripts/rc.atalkd.netbsd.tmpl
new file mode 100644 (file)
index 0000000..16fff48
--- /dev/null
@@ -0,0 +1,39 @@
+#!/bin/sh
+#
+# PROVIDE: atalkd
+# REQUIRE: DAEMON
+#
+# AppleTalk daemons. Make sure not to start atalkd in the background:
+# its data structures must have time to stablize before running the
+# other processes.
+#
+
+. /etc/rc.subr
+
+name="atalkd"
+rcvar=$name
+command=":SBINDIR:/atalkd"
+pidfile="/var/run/${name}.pid"
+register=":BINDIR:/nbprgstr"
+myhostname=`hostname|sed 's/\..*$//'`
+required_files=":ETCDIR:/atalkd.conf $register"
+
+start_cmd="atalkd_start"
+
+atalkd_start()
+{
+       if [ -x $command ]; then
+               echo 'Starting atalkd.'
+               $command $command_args
+       fi
+
+       if [ -x $register ]; then
+               echo 'Setting AppleTalk info with nbprgstr.'
+               $register -p 4 $myhostname:Workstation
+               $register -p 4 $myhostname:netatalk
+       fi
+}
+
+load_rc_config $name
+run_rc_command "$1"
+
diff --git a/distrib/initscripts/rc.papd.netbsd.tmpl b/distrib/initscripts/rc.papd.netbsd.tmpl
new file mode 100644 (file)
index 0000000..bcce58e
--- /dev/null
@@ -0,0 +1,21 @@
+#!/bin/sh
+#
+# PROVIDE: papd
+# REQUIRE: atalkd
+#
+# AppleTalk daemons. Make sure not to start atalkd in the background:
+# its data structures must have time to stablize before running the
+# other processes.
+#
+
+. /etc/rc.subr
+
+name="papd"
+rcvar=$name
+command=":SBINDIR:/papd"
+pidfile="/var/run/${name}.pid"
+required_files=":ETCDIR:/papd.conf"
+
+load_rc_config $name
+run_rc_command "$1"
+
diff --git a/distrib/initscripts/rc.timelord.netbsd.tmpl b/distrib/initscripts/rc.timelord.netbsd.tmpl
new file mode 100644 (file)
index 0000000..23d3ae2
--- /dev/null
@@ -0,0 +1,20 @@
+#!/bin/sh
+#
+# PROVIDE: timelord
+# REQUIRE: atalkd
+#
+# AppleTalk daemons. Make sure not to start atalkd in the background:
+# its data structures must have time to stablize before running the
+# other processes.
+#
+
+. /etc/rc.subr
+
+name="timelord"
+rcvar=$name
+command=":SBINDIR:/timelord"
+pidfile="/var/run/${name}.pid"
+
+load_rc_config $name
+run_rc_command "$1"
+