3 test -x /usr/sbin/atalkd || exit 0
5 # Set defaults. Please change these options in /etc/default/netatalk.
6 AFPD_UAMLIST="-U uams_clrtxt.so,uams_randnum.so"
9 ATALK_NAME=`/bin/hostname --short`
11 # Read in netatalk configuration.
12 if [ -f /etc/default/netatalk ]; then
13 . /etc/default/netatalk
16 OPTIONS_AFP="$AFPD_UAMLIST -g $AFPD_GUEST -c $AFPD_MAX_CLIENTS -n $ATALK_NAME"
20 if [ "$ATALKD_RUN" = "yes" ]; then
21 # Quickly probe for appletalk if it was supposed to be loaded
22 if grep '^appletalk$' /etc/modules; then
23 /sbin/modprobe appletalk || echo "[could not load appletalk module]"
26 echo -n "Starting AppleTalk Daemons (this will take a while):"
30 /usr/bin/nbprgstr -p 4 "$ATALK_NAME:Workstation"
31 /usr/bin/nbprgstr -p 4 "$ATALK_NAME:netatalk"
34 if [ "$AFPD_RUN" = "yes" ]; then
35 /usr/sbin/afpd $OPTIONS_AFP
39 if [ "$ATALKD_RUN" = "yes" -a "$PAPD_RUN" = "yes" ]; then
44 if [ "$TIMELORD_RUN" = "yes" ]; then
53 echo -n "Stopping AppleTalk Daemons:"
55 start-stop-daemon --stop --quiet --oknodo --exec /usr/sbin/afpd
58 start-stop-daemon --stop --quiet --oknodo --exec /usr/sbin/papd
60 echo -n " timelord"; \
61 start-stop-daemon --stop --quiet --oknodo --exec /usr/sbin/timelord
64 start-stop-daemon --stop --quiet --oknodo --exec /usr/sbin/atalkd
74 echo -n "Restarting AppleTalk Daemons (this will take a while)"
75 /etc/init.d/netatalk stop > /dev/null 2>&1
79 if /etc/init.d/netatalk start > /dev/null 2>&1; then
85 echo "Usage: /etc/init.d/netatalk {start|stop|restart|force-reload}" >&2