2 # Copyright (c) 1996-2001 SuSE GmbH Nuernberg, Germany. All rights reserved.
5 # Reinhold Sojer, <reinhold@suse.de>
6 # Olaf Hering, <olh@suse.de>
10 # Required-Start: $network $named $remote_fs $syslog
14 # Description: Appletalk TCP/IP daemons
17 test -f /etc/rc.config && {
20 # Determine the base and follow a runlevel link name.
22 link=${base#*[SK][0-9][0-9]}
24 # Force execution if not called by a runlevel directory.
25 test $link = $base && START_ATALK=yes
26 test "$START_ATALK" = "yes" || exit 0
28 test -f /etc/rc.status && . /etc/rc.status
29 # The echo return value for success (defined in /etc/rc.config).
33 . :ETCDIR:/netatalk.conf
35 # startup code for everything
37 if [ x"${ATALKD_RUN}" != x"no" ]; then
38 echo -n " Starting atalkd:"
41 if [ -x :BINDIR:/nbprgstr ]; then
42 :BINDIR:/nbprgstr -p 4 `hostname|sed 's/\..*$//'`:Workstation
43 :BINDIR:/nbprgstr -p 4 `hostname|sed 's/\..*$//'`:netatalk
47 if [ x"${PAPD_RUN}" = x"yes" -a -x :SBINDIR:/papd ]; then
48 echo -n " Starting papd:"
52 if [ x"${TIMELORD_RUN}" = x"yes" -a -x :SBINDIR:/timelord ]; then
53 echo -n " Starting timelord"
59 if [ x"${CNID_METAD_RUN}" = x"yes" -a -x :SBINDIR:/cnid_metad ] ; then
60 echo -n " Starting cnid_metad:"
61 if [ "x$CNID_DBD_LOGCONFIG" = "x" ]; then
62 startproc :SBINDIR:/cnid_metad
64 startproc :SBINDIR:/cnid_metad -l "$CNID_DBD_LOGCONFIG"
68 if [ x"${AFPD_RUN}" = x"yes" -a -x :SBINDIR:/afpd ] ; then
69 echo -n " Starting afpd:"
70 echo ${AFPD_UAMLIST} -g ${AFPD_GUEST} \
71 -c ${AFPD_MAX_CLIENTS} -n ${ATALK_NAME}${ATALK_ZONE}
72 startproc :SBINDIR:/afpd ${AFPD_UAMLIST} -g ${AFPD_GUEST} \
73 -c ${AFPD_MAX_CLIENTS} -n ${ATALK_NAME}${ATALK_ZONE}
76 touch /var/lock/subsys/atalk
81 if [ x"${ATALK_BGROUND}" = x"yes" ]; then
82 echo "Starting netatalk in the background ... "
83 atalk_startup >& /dev/null &
85 echo "Starting netatalk (this may take a while) ..."
90 echo -n "Shutting down netatalk:"
91 killproc -TERM :SBINDIR:/papd
92 if test -x :SBINDIR:/timelord ; then
93 killproc -TERM :SBINDIR:/timelord
95 killproc -TERM :SBINDIR:/atalkd
96 killproc -TERM :SBINDIR:/afpd
97 if test -x :SBINDIR:/cnid_metad ; then
98 killproc -TERM :SBINDIR:/cnid_metad
103 $0 stop && $0 start || return=$rc_failed
106 echo -n "Checking for service atalk:"
107 checkproc :SBINDIR:/papd && echo -n "OK" || echo -n "No process"
108 checkproc :SBINDIR:/afpd && echo -n "OK" || echo "No process"
109 if test -x :SBINDIR:/timelord ; then
110 checkproc :SBINDIR:/timelord || return=$rc_failed
112 if test -x :SBINDIR:/cnid_metad ; then
113 checkproc :SBINDIR:/cnid_metad || return=$rc_failed
115 checkproc :SBINDIR:/atalkd && echo "OK" || echo "No process"
118 echo "Usage: $0 {start|stop|restart|status}"
123 # Inform the caller not only verbosely and set an exit status.
124 test "$return" = "$rc_done" || exit 1