<$< >$@
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)
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
+
--- /dev/null
+#!/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"
+
--- /dev/null
+#!/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"
+
--- /dev/null
+#!/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"
+
--- /dev/null
+#!/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"
+