diff options
Diffstat (limited to 'source/n/netatalk/rc.atalk.new')
-rw-r--r-- | source/n/netatalk/rc.atalk.new | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/source/n/netatalk/rc.atalk.new b/source/n/netatalk/rc.atalk.new new file mode 100644 index 000000000..ce490345f --- /dev/null +++ b/source/n/netatalk/rc.atalk.new @@ -0,0 +1,56 @@ +# +# AppleTalk daemons. Make sure not to start atalkd in the background: +# its data structures must have time to stablize before running the +# other processes. +# + +netatalk_start() { + echo -n 'starting appletalk daemons: ' + if [ -x /usr/sbin/atalkd ]; then + echo -n ' atalkd' + /usr/sbin/atalkd + fi + if [ -x /usr/bin/nbprgstr ]; then + echo -n ' nbprgstr' + /usr/bin/nbprgstr -p 4 `hostname|sed 's/\..*$//'`:Workstation + /usr/bin/nbprgstr -p 4 `hostname|sed 's/\..*$//'`:netatalk + fi + if [ -x /usr/sbin/papd ]; then + echo -n ' papd' + /usr/sbin/papd + fi + if [ -x /usr/sbin/afpd ]; then + echo -n ' afpd' + /usr/sbin/afpd + fi + if [ -x /usr/sbin/timelord ]; then + echo -n ' timelord' + /usr/sbin/timelord + fi + echo +} + +netatalk_stop() { + killall atalkd nbprgstr papd afpd timelord 2> /dev/null +} + +netatalk_restart() { + netatalk_stop + sleep 1 + netatalk_start +} + +case "$1" in +'start') + netatalk_start + ;; +'stop') + netatalk_stop + ;; +'restart') + netatalk_restart + ;; +*) + netatalk_start +esac + |