3 # description: This package enables Linux to talk to Macintosh computers via the \
4 # AppleTalk networking protocol. It includes a daemon to allow Linux \
5 # to act as a file server over EtherTalk or IP for Mac's.
7 # pidfile: /var/run/atalkd.pid
10 # Source function library.
11 . /etc/rc.d/init.d/functions
13 # Source networking configuration.
14 . /etc/sysconfig/network
16 # Source Appletalk configuration
17 . /etc/sysconfig/netatalk
19 # Check that networking is up.
20 if is_yes "${NETWORKING}"; then
21 if [ ! -f /var/lock/subsys/network ]; then
22 msg_network_down AppleTalk
29 #check atalkd.conf exit
30 #[ -f /etc/atalk/atalkd.conf ] || exit 0
35 if [ ! -f /var/lock/subsys/atalk ]; then
36 _insmod single -f /lib/modules/`uname -r`/misc/appletalk.o
37 if [ "$ATALK_BGROUND" = yes ]; then
38 # nls -n "(backgrounded)"
39 msg_starting AppleTalk
41 nbprgstr -p 4 "${ATALK_NAME}:Workstation"
42 nbprgstr -p 4 "${ATALK_NAME}:netatalk"
43 if [ ${PAPD_RUN} = yes ]; then
47 if [ ${AFPD_RUN} = yes ]; then
49 daemon afpd -c ${AFPD_MAX_CLIENTS} -n ${ATALK_NAME}
54 msg_already_running AppleTalk
56 touch /var/lock/subsys/atalk
59 if [ -f /var/lock/subsys/atalk ]; then
60 if [ "$ATALK_BGROUND" = yes ]; then
65 nbpunrgstr "${ATALK_NAME}:Workstation@*"
66 nbpunrgstr "${ATALK_NAME}:netatalk@*"
67 msg_stopping AppleTalk
70 # Attempt to zap the module, so that we can restart the
71 # Appletalk daemons cleanly
72 if [ -e /proc/modules ] && [ -x /sbin/modprobe ]; then
75 rm -f /var/lock/subsys/atalk >/dev/null 2>&1
77 msg_not_running AppleTalk
89 [ $RETVAL -eq 0 ] && RETVAL=?
91 [ $RETVAL -eq 0 ] && RETVAL=?
94 msg_usage "$0 {start|stop|restart|force-reload|status}"