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
18
ATALK_START_TIMELORD=0
21
# kill the named process(es)
26
/usr/bin/grep -v grep |
27
/usr/bin/sed -e 's/^ *//' -e 's/ .*//'`
28
[ "$pid" != "" ] && kill $pid
34
# Start the appletalk server processes.
39
echo 'starting appletalk daemons: \c'
40
if [ ${ATALK_START_ATALKD} -eq 1 -a -x ${ATALK_SBIN}/atalkd ]; then
41
${ATALK_SBIN}/atalkd; echo ' atalkd\c'
44
if [ ${ATALK_START_NBPRGSTR} -eq 1 -a -x ${ATALK_BIN}/nbprgstr ]; then
45
${ATALK_BIN}/nbprgstr -p 4 `hostname|sed 's/\..*$//'`:Workstation
46
${ATALK_BIN}/nbprgstr -p 4 `hostname|sed 's/\..*$//'`:netatalk
50
if [ ${ATALK_START_PAPD} -eq 1 -a -x ${ATALK_SBIN}/papd ]; then
51
${ATALK_SBIN}/papd; echo ' papd\c'
54
if [ ${ATALK_START_AFPD} -eq 1 -a -x ${ATALK_SBIN}/afpd ]; then
55
${ATALK_SBIN}/afpd; echo ' afpd\c'
58
if [ ${ATALK_START_TIMELORD} -eq 1 -a -x ${ATALK_SBIN}/timelord ]; then
59
${ATALK_SBIN}/timelord; echo ' timelord\c'
67
# Stop the appletalk server processes.
72
echo 'stopping appletalk daemons:\c'
74
if [ -x ${ATALK_SBIN}/papd ]; then
75
killproc papd; echo ' papd\c'
78
if [ -x ${ATALK_SBIN}/afpd ]; then
79
killproc afpd; echo ' afpd\c'
82
if [ -x ${ATALK_SBIN}/timelord ]; then
83
killproc timelord; echo ' timelord\c'
86
# kill atalkd last, since without it the plumbing goes away.
87
if [ -x ${ATALK_SBIN}/atalkd ]; then
88
killproc atalkd; echo ' atalkd\c'
99
echo "usage: $0 {start|stop}"