3 # Start/stop the AppleTalk daemons.
5 # AppleTalk daemons. Make sure not to start atalkd in the background:
6 # its data structures must have time to stablize before running the
11 ATALK_CONF_DIR=:ETCDIR:
15 ATALK_START_NBPRGSTR=0
17 ATALK_START_CNID_METAD=1
19 ATALK_START_TIMELORD=0
22 # kill the named process(es)
27 /usr/bin/grep -v grep |
28 /usr/bin/sed -e 's/^ *//' -e 's/ .*//'`
29 [ "$pid" != "" ] && kill $pid
35 # Start the appletalk server processes.
40 echo 'starting appletalk daemons: \c'
41 if [ ${ATALK_START_ATALKD} -eq 1 -a -x ${ATALK_SBIN}/atalkd ]; then
42 ${ATALK_SBIN}/atalkd; echo ' atalkd\c'
45 if [ ${ATALK_START_NBPRGSTR} -eq 1 -a -x ${ATALK_BIN}/nbprgstr ]; then
46 ${ATALK_BIN}/nbprgstr -p 4 `hostname|sed 's/\..*$//'`:Workstation
47 ${ATALK_BIN}/nbprgstr -p 4 `hostname|sed 's/\..*$//'`:netatalk
51 if [ ${ATALK_START_PAPD} -eq 1 -a -x ${ATALK_SBIN}/papd ]; then
52 ${ATALK_SBIN}/papd; echo ' papd\c'
55 if [ ${ATALK_START_CNID_METAD} -eq 1 -a -x ${ATALK_SBIN}/cnid_metad ]; then
56 ${ATALK_SBIN}/cnid_metad; echo ' cnid_metad\c'
59 if [ ${ATALK_START_AFPD} -eq 1 -a -x ${ATALK_SBIN}/afpd ]; then
60 ${ATALK_SBIN}/afpd; echo ' afpd\c'
63 if [ ${ATALK_START_TIMELORD} -eq 1 -a -x ${ATALK_SBIN}/timelord ]; then
64 ${ATALK_SBIN}/timelord; echo ' timelord\c'
72 # Stop the appletalk server processes.
77 echo 'stopping appletalk daemons:\c'
79 if [ -x ${ATALK_SBIN}/papd ]; then
80 killproc papd; echo ' papd\c'
83 if [ -x ${ATALK_SBIN}/afpd ]; then
84 killproc afpd; echo ' afpd\c'
87 if [ -x ${ATALK_SBIN}/cnid_metad ]; then
88 killproc cnid_metad; echo ' cnid_metad\c'
91 if [ -x ${ATALK_SBIN}/timelord ]; then
92 killproc timelord; echo ' timelord\c'
95 # kill atalkd last, since without it the plumbing goes away.
96 if [ -x ${ATALK_SBIN}/atalkd ]; then
97 killproc atalkd; echo ' atalkd\c'
108 echo "usage: $0 {start|stop}"