diff options
author | Tim 'timtim' Ellis <tim.ellis@foonas.org> | 2009-02-01 21:53:16 +0000 |
---|---|---|
committer | Tim 'timtim' Ellis <tim.ellis@foonas.org> | 2009-02-01 21:53:16 +0000 |
commit | 323cab3bfbcde5a648452f6f7ca0abc82ea4833b (patch) | |
tree | 6c4e87cb7742a690e7c3c7c9b2b712c7a98395f4 /packages/netatalk/files/init | |
parent | 22ab2a4ce2090db93fe233984f6d15a5776084fd (diff) |
netatalk: Fix non-working package:
- Disable SLP support, probably noone uses it and these tests break do_qa_configure
- Update init script to work
- Split up non-AFP over IP stuff into separate packages
- Disable PAM or this means adding lots of pam modules to any distros that want this to work
Diffstat (limited to 'packages/netatalk/files/init')
-rw-r--r--[-rwxr-xr-x] | packages/netatalk/files/init | 68 |
1 files changed, 30 insertions, 38 deletions
diff --git a/packages/netatalk/files/init b/packages/netatalk/files/init index 926f9bbb1e..380cc49e16 100755..100644 --- a/packages/netatalk/files/init +++ b/packages/netatalk/files/init @@ -1,62 +1,45 @@ -#!/sbin/runscript - -# 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 - use logger dns -} +#!/bin/sh atalk_startup () { -# . /etc/netatalk/netatalk.conf - if [ "${ATALKD_RUN}" != "no" ]; then - ebegin "Starting atalkd" + echo "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" + echo " Registering $reg" /usr/bin/nbprgstr "$reg" - eend $? done if [ "${PAPD_RUN}" = "yes" ]; then - ebegin " Starting papd" + echo " Starting papd" start-stop-daemon --start --quiet --exec /usr/sbin/papd - eend $? fi fi if [ "${CNID_METAD_RUN}" = "yes" ] ; then - ebegin "Starting cnid_metad" + echo "Starting cnid_metad" start-stop-daemon --start --quiet --exec /usr/sbin/cnid_metad - eend $? fi if [ "${AFPD_RUN}" = "yes" ]; then - ebegin "Starting afpd" + echo "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 if [ "${TIMELORD_RUN}" = "yes" ]; then - ebegin "Starting timelord" + echo "Starting timelord" start-stop-daemon --start --quiet --exec /usr/sbin/timelord - eend $? fi } -start () { +start_netatalk () { . /etc/netatalk/netatalk.conf if [ x"${ATALK_BGROUND}" = x"yes" ]; then @@ -67,45 +50,54 @@ start () { fi } -stop () { +stop_netatalk () { . /etc/netatalk/netatalk.conf if [ "${AFPD_RUN}" = "yes" ]; then - ebegin "Stopping afpd" + echo "Stopping afpd" start-stop-daemon --stop --quiet --exec /usr/sbin/afpd - eend $? fi if [ "${TIMELORD_RUN}" = "yes" ]; then - ebegin "Stopping timelord" + echo "Stopping timelord" start-stop-daemon --stop --quiet --exec /usr/sbin/timelord - eend $? fi if [ "${ATALKD_RUN}" != "no" ]; then if [ "${PAPD_RUN}" = "yes" ]; then - ebegin "Stopping papd" + echo "Stopping papd" start-stop-daemon --stop --quiet --exec /usr/sbin/papd - eend $? fi for reg in \ "${ATALK_NAME}:Workstation${ATALK_ZONE}" \ "${ATALK_NAME}:netatalk${ATALK_ZONE}" do - ebegin "Unregistering $reg" + echo "Unregistering $reg" /usr/bin/nbpunrgstr "$reg" - eend $? done - ebegin "Stopping atalkd" + echo "Stopping atalkd" start-stop-daemon --stop --quiet --exec /usr/sbin/atalkd - eend $? fi if [ "${CNID_METAD_RUN}" = "yes" ] ; then - ebegin "Stopping cnid_metad" + echo "Stopping cnid_metad" start-stop-daemon --stop --quiet --exec /usr/sbin/cnid_metad - eend $? fi } + +case "$1" in + start) + start_netatalk + ;; + stop) + stop_netatalk + ;; + *) + echo "Usage: {start|stop}" >&2 + exit 1 + ;; +esac + +exit 0 |