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 if is_yes "${NETWORKING}"; then
29 if [ ! -f /var/lock/subsys/network ]; then
30 # nls "ERROR: Networking is down. %s can't be run." <service>
31 msg_network_down "AppleTalk"
38 # initialize return values
44 # startup code for everything
47 if [ -f /var/lock/subsys/atalk ]; then
48 msg_already_running "AppleTalk"
52 if is_no "${ATALKD_RUN}"; then
56 run_cmd $(nls "Registering %s" "${ATALK_NAME}:Workstation${ATALK_ZONE}:") "nbprgstr -p 4 \"${ATALK_NAME}:Workstation${ATALK_ZONE}\""
57 run_cmd $(nls "Registering %s" "${ATALK_NAME}:netatalk${ATALK_ZONE}:") "nbprgstr -p 4 \"${ATALK_NAME}:netatalk${ATALK_ZONE}\""
58 if is_yes "${PAPD_RUN}"; then
65 if is_yes "${TIMELORD_RUN}"; then
66 msg_starting "timelord"
70 if is_yes "${AFPD_RUN}"; then
72 daemon afpd ${AFPD_UAMLIST} -g ${AFPD_GUEST} -c ${AFPD_MAX_CLIENTS} -n \"${ATALK_NAME}${ATALK_ZONE}\"
76 if [ "$RETVAL_ATALKD" -eq 0 -a "$RETVAL_PAPD" -eq 0 -a "$RETVAL_AFPD" -eq 0 ]; then
78 touch /var/lock/subsys/atalk || RETVAL=1
83 if [ ! -f /var/lock/subsys/atalk ]; then
84 msg_not_running "AppleTalk"
88 if is_no "${ATALKD_RUN}"; then
89 if is_yes "${PAPD_RUN}"; then
95 if is_yes "${TIMELORD_RUN}"; then
96 msg_stopping "timelord"
100 run_cmd $(nls "Unregistering %s" "${ATALK_NAME}:Workstation${ATALK_ZONE}:") "nbpunrgstr \"${ATALK_NAME}:Workstation${ATALK_ZONE}\""
101 run_cmd $(nls "Unregistering %s" "${ATALK_NAME}:netatalk${ATALK_ZONE}:") "nbpunrgstr \"${ATALK_NAME}:netatalk${ATALK_ZONE}\""
108 if [ is_yes "${AFPD_RUN}"; then
114 if [ "$RETVAL_ATALKD" -eq 0 -a "$RETVAL_PAPD" -eq 0 -a "$RETVAL_AFPD" -eq 0 ]; then
116 rm -f /var/lock/subsys/atalk || RETVAL=1
129 msg_usage "$0 {start|stop|restart|reload|status}"