3 # description: This package enables Linux to talk to Macintosh
4 # computers via the AppleTalk networking protocol and
5 # provides printer, file sharing, and AppleTalk routing
8 # AppleTalk daemons. Make sure not to start atalkd in the background:
9 # its data structures must have time to stablize before running the
12 # Source function library.
13 . /etc/rc.d/init.d/functions
15 # Source networking configuration.
16 . /etc/sysconfig/network
18 # Quickly probe for appletalk and warn if we can't find it
19 /sbin/modprobe appletalk || echo "[could not load appletalk module]"
21 # Check for IP Encapsulation support
22 #/sbin/modprobe ipddp || echo "[could not load IP encapsulation]"
24 # read in netatalk configuration
25 . /etc/sysconfig/netatalk
27 # Check that networking is up.
28 [ ${NETWORKING} = "no" ] && exit 0
30 # initialize return values
36 # startup code for everything
40 if [ -f /var/lock/subsys/atalk ]; then
41 msg_Already_Running "AppleTalk services"
45 if [ x"${ATALKD_RUN}" != x"no" ]; then
49 action "Registering ${ATALK_NAME}:Workstation${ATALK_ZONE}:" nbprgstr -p 4 \"${ATALK_NAME}:Workstation${ATALK_ZONE}\"
50 action "Registering ${ATALK_NAME}:netatalk${ATALK_ZONE}:" nbprgstr -p 4 \"${ATALK_NAME}:netatalk${ATALK_ZONE}\"
51 if [ x"${PAPD_RUN}" = x"yes" ]; then
58 if [ x"${TIMELORD_RUN}" = x"yes" ]; then
59 msg_starting "timelord"
63 if [ x"${AFPD_RUN}" = x"yes" ] ; then
65 daemon afpd ${AFPD_UAMLIST} -g ${AFPD_GUEST} -c ${AFPD_MAX_CLIENTS} -n \"${ATALK_NAME}${ATALK_ZONE}\"
69 if [ $RETVAL_ATALKD -eq 0 -a $RETVAL_PAPD -eq 0 -a $RETVAL_AFPD -eq 0 ]; then
71 touch /var/lock/subsys/atalk || RETVAL=1
76 if [ ! -f /var/lock/subsys/atalk ]; then
77 msg_Not_Running "AppleTalk services"
81 if [ x"${ATALKD_RUN}" != x"no" ]; then
82 if [ x"${PAPD_RUN}" = x"yes" ]; then
88 if [ x"${TIMELORD_RUN}" = x"yes" ]; then
89 msg_stopping "timelord"
93 action "Unregistering ${ATALK_NAME}:Workstation${ATALK_ZONE}:" nbpunrgstr \"${ATALK_NAME}:Workstation${ATALK_ZONE}\"
94 action "Unregistering ${ATALK_NAME}:netatalk${ATALK_ZONE}:" nbpunrgstr \"${ATALK_NAME}:netatalk${ATALK_ZONE}\"
101 if [ x"${AFPD_RUN}" = x"yes" ]; then
107 if [ $RETVAL_ATALKD -eq 0 -a $RETVAL_PAPD -eq 0 -a $RETVAL_AFPD -eq 0 ] ; then
109 rm -f /var/lock/subsys/atalk || RETVAL=1
122 echo "Usage: atalk {start|stop|restart|status}"