2 # Copyright (c) 1996-2001 S.u.S.E. GmbH Fuerth, Germany. All rights reserved.
5 # Reinhold Sojer, <reinhold@suse.de>
6 # Olaf Hering, <olh@suse.de>
8 # adapted to 1.4.99 (at 00-11-15) : Thomas Schierle, <ts@visual-s.de>
9 # template changes 2001-02-14 : jeff <jeff@univrel.pr.uconn.edu>
10 # template changes 2001-11-16 : Daniel E. Lautenschleger, <bobo@bocklabs.wisc.edu>
14 test -f :ETCDIR:/netatalk.conf || exit 0
16 . :ETCDIR:/netatalk.conf
18 # Determine the base and follow a runlevel link name.
20 link=${base#*[SK][0-9][0-9]}
22 # Force execution if not called by a runlevel directory.
23 test $link = $base && START_ATALK=yes
24 test "$START_ATALK" = "yes" || exit 0
26 # The echo return value for success (defined in /etc/rc.config).
31 if [ x"${ATALKD_RUN}" != x"no" ]; then
32 echo -n " Starting atalkd:"
35 if [ -x :BINDIR:/nbprgstr ]; then
36 :BINDIR:/nbprgstr -p 4 "${ATALK_NAME}:Workstation${ATALK_ZONE}"
37 :BINDIR:/nbprgstr -p 4 "${ATALK_NAME}:netatalk${ATALK_ZONE}"
41 if [ x"${PAPD_RUN}" = x"yes" -a -x :SBINDIR:/papd ]; then
42 echo -n " Starting papd:"
46 if [ x"${TIMELORD_RUN}" = x"yes" -a -x :SBINDIR:/timelord ]; then
47 echo -n " Starting timelord"
53 if [ x"${AFPD_RUN}" = x"yes" -a -x :SBINDIR:/afpd ] ; then
54 echo -n " Starting afpd:"
55 echo ${AFPD_UAMLIST} -g ${AFPD_GUEST} \
56 -c ${AFPD_MAX_CLIENTS} -n ${ATALK_NAME}${ATALK_ZONE}
57 startproc :SBINDIR:/afpd ${AFPD_UAMLIST} -g ${AFPD_GUEST} \
58 -c ${AFPD_MAX_CLIENTS} -n "${ATALK_NAME}${ATALK_ZONE}"
61 touch /var/lock/subsys/atalk
66 if [ x"${ATALK_BGROUND}" = x"yes" ]; then
67 echo "Starting netatalk in the background ... "
68 atalk_startup >& /dev/null &
70 echo "Starting netatalk (this may take a while) ..."
75 echo -n "Shutting down netatalk:"
76 killproc -TERM :SBINDIR:/papd
77 if test -x :SBINDIR:/timelord ; then
78 killproc -TERM :SBINDIR:/timelord
80 killproc -TERM :SBINDIR:/atalkd
81 killproc -TERM :SBINDIR:/afpd
85 $0 stop && $0 start || return=$rc_failed
88 echo -n "Checking for service atalk:"
89 checkproc :SBINDIR:/papd && echo -n "OK" || echo -n "No process"
90 checkproc :SBINDIR:/afpd && echo -n "OK" || echo "No process"
91 if test -x :SBINDIR:/timelord ; then
92 checkproc :SBINDIR:/timelord || return=$rc_failed
94 checkproc :SBINDIR:/atalkd && echo "OK" || echo "No process"
97 echo "Usage: $0 {start|stop|restart|status}"
102 # Inform the caller not only verbosely and set an exit status.
103 test "$return" = "$rc_done" || exit 1