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 | |
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')
-rw-r--r--[-rwxr-xr-x] | packages/netatalk/files/init | 68 | ||||
-rw-r--r-- | packages/netatalk/files/netatalk.conf | 44 |
2 files changed, 74 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 diff --git a/packages/netatalk/files/netatalk.conf b/packages/netatalk/files/netatalk.conf new file mode 100644 index 0000000000..dc0efbc249 --- /dev/null +++ b/packages/netatalk/files/netatalk.conf @@ -0,0 +1,44 @@ +# Appletalk configuration +# Change this to increase the maximum number of clients that can connect: +AFPD_MAX_CLIENTS=50 + +# Change this to set the machine's atalk name and zone, the latter containing +# the '@' sign as first character -- compare with nbp_name(3) if in doubt +# +# NOTE: If Netatalk should register AppleTalk services in the standard zone +# then you need not to specify a zone name here. +# +# If your zone has spaces in it, you're better off specifying +# it in afpd.conf if you realize that your distribution doesn't +# handle spaces correctly in the startup script. Remember to use +# quotes here if the zone name contains spaces. +# +#ATALK_ZONE="@some zone" +ATALK_NAME=`echo ${HOSTNAME}|cut -d. -f1` + +# specify the Mac and unix charsets to be used +ATALK_MAC_CHARSET='MAC_ROMAN' +ATALK_UNIX_CHARSET='LOCALE' + +# specify this if you don't want guest, clrtxt, and dhx +# available options: uams_guest.so, uams_clrtxt.so, uams_dhx.so, +# uams_randnum.so +#AFPD_UAMLIST="-U uams_clrtxt.so,uams_dhx.so" + +# Change this to set the id of the guest user +AFPD_GUEST=nobody + +# Set which daemons to run (papd is dependent upon atalkd): +ATALKD_RUN=no +PAPD_RUN=yes +CNID_METAD_RUN=yes +AFPD_RUN=yes +TIMELORD_RUN=no +A2BOOT_RUN=no + +# Control whether the daemons are started in the background +ATALK_BGROUND=no + +# export the charsets, read form ENV by apps +export ATALK_MAC_CHARSET +export ATALK_UNIX_CHARSET |