# description: This package enables Linux to talk to Macintosh \
# computers via the AppleTalk networking protocol and \
# provides printer, file sharing, and AppleTalk routing \
-# services.
+# services.
#
# AppleTalk daemons. Make sure not to start atalkd in the background:
# its data structures must have time to stablize before running the
# Check that networking is up.
if is_yes "${NETWORKING}"; then
if [ ! -f /var/lock/subsys/network -a "$1" != stop -a "$1" != status ]; then
+ # nls "ERROR: Networking is down. %s can't be run." <service>
msg_network_down "AppleTalk"
exit 1
fi
RETVAL_PAPD=0
RETVAL_AFPD=0
-# startup code for everything
-case "$1" in
- start)
+start() {
if [ -f /var/lock/subsys/atalk ]; then
msg_already_running "AppleTalk"
exit 0
fi
- if is_yes "${ATALKD_RUN}"; then
+ if is_yes "${ATALKD_RUN}"; then
msg_starting "atalkd"
daemon atalkd
RETVAL_ATALKD=$?
RETVAL=0
touch /var/lock/subsys/atalk || RETVAL=1
fi
- ;;
+}
- stop)
+stop() {
if [ ! -f /var/lock/subsys/atalk ]; then
msg_not_running "AppleTalk"
exit 0
msg_stopping "afpd"
killproc afpd
fi
-
- RETVAL=0
rm -f /var/lock/subsys/atalk >/dev/null 2>&1
+}
+
+RETVAL=0
+# startup code for everything
+case "$1" in
+ start)
+ start
+ ;;
+
+ stop)
+ stop
;;
restart|force-reload)
- $0 stop
- $0 start
- exit $?
+ stop
+ start
;;
status)
- if is_yes "${ATALKD_RUN}"; then
+ if is_yes "${ATALKD_RUN}"; then
if is_yes "${PAPD_RUN}"; then
status papd
fi
-
+
if is_yes "${TIMELORD_RUN}"; then
status timelord
fi
-
+
if is_yes "${AFPD_RUN}"; then
status afpd
fi