diff options
Diffstat (limited to 'net-fs/netatalk/files/atalk-rc6')
-rw-r--r-- | net-fs/netatalk/files/atalk-rc6 | 87 |
1 files changed, 87 insertions, 0 deletions
diff --git a/net-fs/netatalk/files/atalk-rc6 b/net-fs/netatalk/files/atalk-rc6 new file mode 100644 index 000000000000..5de43037b3de --- /dev/null +++ b/net-fs/netatalk/files/atalk-rc6 @@ -0,0 +1,87 @@ +#!/sbin/runscript +# $Header: /var/cvsroot/gentoo-x86/net-fs/netatalk/files/atalk-rc6,v 1.1 2002/02/27 05:16:53 chouser Exp $ + +# AppleTalk daemons. Make sure not to start atalkd in the background: +# its data structures must have time to stablize before running the +# other processes. + +depend() { + need net +} + +start () { + . /etc/netatalk/netatalk.conf + + if [ "${ATALKD_RUN}" != "no" ]; then + ebegin "Starting atalkd" + start-stop-daemon --start --quiet --exec /usr/sbin/atalkd + eend $? + + for reg in \ + "${ATALK_NAME}:Workstation${ATALK_ZONE}" \ + "${ATALK_NAME}:netatalk${ATALK_ZONE}" + do + ebegin " Registering $reg" + /usr/bin/nbprgstr -p 4 "$reg" + eend $? + done + + if [ "${PAPD_RUN}" = "yes" ]; then + ebegin " Starting papd" + start-stop-daemon --start --quiet --exec /usr/sbin/papd + eend $? + fi + + if [ "${TIMELORD_RUN}" = "yes" ]; then + ebegin " Starting timelord" + start-stop-daemon --start --quiet --exec /usr/sbin/timelord + eend $? + fi + fi + + if [ "${AFPD_RUN}" = "yes" ]; then + ebegin "Starting afpd" + start-stop-daemon --start --quiet --exec /usr/sbin/afpd -- \ + ${AFPD_UAMLIST} -g ${AFPD_GUEST} -c ${AFPD_MAX_CLIENTS} \ + -n "${ATALK_NAME}${ATALK_ZONE}" + eend $? + fi +} + + +stop () { + . /etc/netatalk/netatalk.conf + + if [ "${ATALKD_RUN}" != "no" ]; then + if [ "${PAPD_RUN}" = "yes" ]; then + ebegin "Stopping papd" + start-stop-daemon --stop --quiet --exec /usr/sbin/papd + eend $? + fi + + if [ "${TIMELORD_RUN}" = "yes" ]; then + ebegin "Stopping timelord" + start-stop-daemon --stop --quiet --exec /usr/sbin/timelord + eend $? + fi + + for reg in \ + "${ATALK_NAME}:Workstation${ATALK_ZONE}" \ + "${ATALK_NAME}:netatalk${ATALK_ZONE}" + do + ebegin "Unregistering $reg" + /usr/bin/nbpunrgstr "$reg" + eend $? + done + + ebegin "Stopping atalkd" + start-stop-daemon --stop --quiet --exec /usr/sbin/atalkd + eend $? + fi + + if [ "${AFPD_RUN}" = "yes" ]; then + ebegin "Stopping afpd" + start-stop-daemon --stop --quiet --exec /usr/sbin/afpd + eend $? + fi +} |