ATALK_BGROUND is not important any longer.
Ubuntu's ATALK_NAME was empty.
# Global configuration
#########################################################################
-# machine's AFPserver/AppleTalk name.
-ATALK_NAME=`echo ${HOSTNAME}|cut -d. -f1`
+#### machine's AFPserver/AppleTalk name.
+#ATALK_NAME=machinename
-# server (unix) and legacy client (<= Mac OS 9) charsets
+#### server (unix) and legacy client (<= Mac OS 9) charsets
ATALK_UNIX_CHARSET='LOCALE'
ATALK_MAC_CHARSET='MAC_ROMAN'
-# Don't Edit. export the charsets, read form ENV by apps
+#### Don't Edit. export the charsets, read form ENV by apps
export ATALK_UNIX_CHARSET
export ATALK_MAC_CHARSET
-# Control whether the daemons are started in the background.
-# If it is dissatisfied that legacy atalkd starts slowly, set "yes".
-ATALK_BGROUND=no
-
#########################################################################
# AFP specific configuration
#########################################################################
-# Set which daemons to run.
-# If you use AFP file server, run both cnid_metad and afpd.
+#### Set which daemons to run.
+#### If you use AFP file server, run both cnid_metad and afpd.
CNID_METAD_RUN=yes
AFPD_RUN=yes
-# maximum number of clients that can connect:
-AFPD_MAX_CLIENTS=20
+#### maximum number of clients that can connect:
+#AFPD_MAX_CLIENTS=20
-# UAMs (User Authentication Modules)
-# available options: uams_dhx.so, uams_dhx2.so, uams_guest.so,
-# uams_clrtxt.so(legacy), uams_randnum.so(legacy)
-# AFPD_UAMLIST="-U uams_dhx.so,uams_dhx2.so"
+#### UAMs (User Authentication Modules)
+#### available options: uams_dhx.so, uams_dhx2.so, uams_guest.so,
+#### uams_clrtxt.so(legacy), uams_randnum.so(legacy)
+#AFPD_UAMLIST="-U uams_dhx.so,uams_dhx2.so"
-# Set the id of the guest user when using uams_guest.so
-AFPD_GUEST=nobody
+#### Set the id of the guest user when using uams_guest.so
+#AFPD_GUEST=nobody
-# config for cnid_metad. Default log config:
-# CNID_CONFIG="-l log_note"
+#### config for cnid_metad. Default log config:
+#CNID_CONFIG="-l log_note"
#########################################################################
# AppleTalk specific configuration (legacy)
#########################################################################
-# Set which legacy daemons to run.
-# If you need AppleTalk, run atalkd.
-# papd, timelord and a2boot are dependent upon atalkd.
-ATALKD_RUN=no
-PAPD_RUN=no
-TIMELORD_RUN=no
-A2BOOT_RUN=no
-
-# Set the AppleTalk Zone name.
-# NOTE: if your zone has spaces in it, you're better off specifying
-# it in afpd.conf
+#### Set which legacy daemons to run.
+#### If you need AppleTalk, run atalkd.
+#### papd, timelord and a2boot are dependent upon atalkd.
+#ATALKD_RUN=no
+#PAPD_RUN=no
+#TIMELORD_RUN=no
+#A2BOOT_RUN=no
+
+#### Control whether the daemons are started in the background.
+#### If it is dissatisfied that legacy atalkd starts slowly, set "yes".
+#ATALK_BGROUND=no
+
+#### Set the AppleTalk Zone name.
+#### NOTE: if your zone has spaces in it, you're better off specifying
+#### it in afpd.conf
#ATALK_ZONE=@zone
## /usr/etc/modload -sym :ETCDIR:/netatalk.o;
##fi
+ATALK_NAME=`hostname|sed 's/\..*$//'`
+ATALK_UNIX_CHARSET='LOCALE'
+ATALK_MAC_CHARSET='MAC_ROMAN'
+
+CNID_METAD_RUN=yes
+AFPD_RUN=yes
+AFPD_MAX_CLIENTS=20
+AFPD_UAMLIST="-U uams_dhx.so,uams_dhx2.so"
+AFPD_GUEST=nobody
+CNID_CONFIG="-l log_note"
+
+ATALKD_RUN=no
+PAPD_RUN=no
+TIMELORD_RUN=no
+#A2BOOT_RUN=no
+ATALK_ZONE=
+#ATALK_BGROUND=no
+
netatalk_conf=":ETCDIR:/netatalk.conf"
[ -f ${netatalk_conf} ] && . ${netatalk_conf}
fi
if [ -x :BINDIR:/nbprgstr ]; then
- :BINDIR:/nbprgstr -p 4 `hostname|sed 's/\..*$//'`:Workstation
- :BINDIR:/nbprgstr -p 4 `hostname|sed 's/\..*$//'`:netatalk
+ :BINDIR:/nbprgstr -p 4 ${ATALK_NAME}:Workstation
+ :BINDIR:/nbprgstr -p 4 ${ATALK_NAME}:netatalk
echo -n ' nbprgstr'
fi
fi
fi
if [ -x :SBINDIR:/cnid_metad -a X"${CNID_METAD_RUN}" != X"no" ]; then
- :SBINDIR:/cnid_metad $CNID_CONFIG
- echo -n ' cnid_metad'
+ :SBINDIR:/cnid_metad $CNID_CONFIG
+ echo -n ' cnid_metad'
fi
if [ -x :SBINDIR:/afpd -a X"${AFPD_RUN}" != X"no" ]; then
- :SBINDIR:/afpd; echo -n ' afpd'
+ :SBINDIR:/afpd ${AFPD_UAMLIST} -g ${AFPD_GUEST} \
+ -c ${AFPD_MAX_CLIENTS} -n ${ATALK_NAME}${ATALK_ZONE}
+ echo -n ' afpd'
fi
if [ -x :SBINDIR:/timelord -a X"${TIMELORD_RUN}" != X"no" ]; then
#
# netatalk Netatalk 2.x initscript
# Author: Thomas Kaiser <Thomas.Kaiser@phg-online.de>
-# Version: $Id: rc.atalk.debian.tmpl,v 1.6 2009-06-09 11:58:49 franklahm Exp $
set -e
test -x :SBINDIR:/afpd || exit 0
# Set defaults. Please change these options in /etc/default/netatalk
+ATALK_NAME=`/bin/hostname --short`
+ATALK_UNIX_CHARSET='LOCALE'
+ATALK_MAC_CHARSET='MAC_ROMAN'
+
+CNID_METAD_RUN=yes
+AFPD_RUN=yes
+AFPD_MAX_CLIENTS=50
AFPD_UAMLIST="-U uams_dhx2.so"
AFPD_GUEST=nobody
-AFPD_MAX_CLIENTS=50
ATALK_ZONE=
-ATALK_NAME=`/bin/hostname --short`
+CNID_CONFIG="-l log_note"
+
+ATALKD_RUN=no
+PAPD_RUN=no
+TIMELORD_RUN=no
+#A2BOOT_RUN=no
+ATALK_ZONE=
ATALK_BGROUND=no
-CNID_METAD_RUN=yes
-ATALK_MAC_CHARSET='MAC_ROMAN'
-ATALK_UNIX_CHARSET='LOCALE'
# Read in netatalk configuration.
if [ -f /etc/default/netatalk ]; then
# Try to load the AppleTalk kernel module if it was intended.
if grep -q '^appletalk$' /etc/modules; then
- /sbin/modprobe appletalk || echo "[could not load appletalk module]"
+ /sbin/modprobe appletalk || echo "[could not load appletalk module]"
fi
# Start atalkd server.
case "$1" in
start)
- if test "x$ATALK_BGROUND" = "xyes"; then
+ if [ "x$ATALK_BGROUND" = "xyes" -a "x$ATALKD_RUN" = "xyes" ]; then
echo "Starting Netatalk services in the background."
atalk_startup >/dev/null &
else
# its data structures must have time to stablize before running the
# other processes.
+ATALK_NAME=`echo ${HOSTNAME}|cut -d. -f1`
+ATALK_UNIX_CHARSET='LOCALE'
+ATALK_MAC_CHARSET='MAC_ROMAN'
+
+CNID_METAD_RUN=yes
+AFPD_RUN=yes
+AFPD_MAX_CLIENTS=20
+AFPD_UAMLIST="-U uams_dhx.so,uams_dhx2.so"
+AFPD_GUEST=nobody
+CNID_CONFIG="-l log_note"
+
+ATALKD_RUN=no
+PAPD_RUN=no
+TIMELORD_RUN=no
+#A2BOOT_RUN=no
+ATALK_ZONE=
+ATALK_BGROUND=no
+
depend() {
need net
use logger dns
start () {
. :ETCDIR:/netatalk.conf
- if [ x"${ATALK_BGROUND}" = x"yes" ]; then
+ if [ x"${ATALK_BGROUND}" = x"yes" -a "${ATALKD_RUN}" != "no" ]; then
echo "Starting netatalk in the background ... "
atalk_startup >& /dev/null &
else
# Source networking configuration.
. /etc/sysconfig/network
+# default
+ATALK_NAME=`echo ${HOSTNAME}|cut -d. -f1`
+ATALK_UNIX_CHARSET='LOCALE'
+ATALK_MAC_CHARSET='MAC_ROMAN'
+
+CNID_METAD_RUN=yes
+AFPD_RUN=yes
+AFPD_MAX_CLIENTS=20
+AFPD_UAMLIST="-U uams_dhx.so,uams_dhx2.so"
+AFPD_GUEST=nobody
+CNID_CONFIG="-l log_note"
+
+ATALKD_RUN=no
+PAPD_RUN=no
+TIMELORD_RUN=no
+A2BOOT_RUN=no
+ATALK_ZONE=
+ATALK_BGROUND=no
+
# read in netatalk configuration
if [ -f ${ATALK_CONF_DIR}/netatalk.conf ]; then
. ${ATALK_CONF_DIR}/netatalk.conf
case "$1" in
'start')
echo -n 'Starting Netatalk services: '
- if [ x"${ATALK_BGROUND}" = x"yes" ]; then
+ if [ x"${ATALK_BGROUND}" = x"yes" -a x"${ATALKD_RUN}" != x"no" ]; then
echo -n "(backgrounded)"
atalk_startup >& /dev/null &
else
return=$rc_done
}
+ATALK_NAME=`hostname|sed 's/\..*$//'`
+ATALK_UNIX_CHARSET='LOCALE'
+ATALK_MAC_CHARSET='MAC_ROMAN'
+
+CNID_METAD_RUN=yes
+AFPD_RUN=yes
+AFPD_MAX_CLIENTS=20
+AFPD_UAMLIST="-U uams_dhx.so,uams_dhx2.so"
+AFPD_GUEST=nobody
+CNID_CONFIG="-l log_note"
+
+ATALKD_RUN=no
+PAPD_RUN=no
+TIMELORD_RUN=no
+#A2BOOT_RUN=no
+ATALK_ZONE=
+ATALK_BGROUND=no
+
+
. :ETCDIR:/netatalk.conf
# startup code for everything
:SBINDIR:/atalkd
if [ -x :BINDIR:/nbprgstr ]; then
- :BINDIR:/nbprgstr -p 4 `hostname|sed 's/\..*$//'`:Workstation
- :BINDIR:/nbprgstr -p 4 `hostname|sed 's/\..*$//'`:netatalk
+ :BINDIR:/nbprgstr -p 4 ${ATALK_NAME}:Workstation
+ :BINDIR:/nbprgstr -p 4 ${ATALK_NAME}:netatalk
fi
case "$1" in
start)
- if [ x"${ATALK_BGROUND}" = x"yes" ]; then
+ if [ x"${ATALK_BGROUND}" = x"yes" -a x"${ATALKD_RUN}" != x"no" ]; then
echo "Starting netatalk in the background ... "
atalk_startup >& /dev/null &
else
[ "$pid" != "" ] && kill $pid
}
-# netatalk.conf expects hostname in $HOSTNAME by default
-HOSTNAME=`hostname`
+# default
+ATALK_NAME=`hostname|cut -d. -f1`
+ATALK_UNIX_CHARSET='LOCALE'
+ATALK_MAC_CHARSET='MAC_ROMAN'
+
+CNID_METAD_RUN=yes
+AFPD_RUN=yes
+AFPD_MAX_CLIENTS=20
+AFPD_UAMLIST="-U uams_dhx.so,uams_dhx2.so"
+AFPD_GUEST=nobody
+CNID_CONFIG="-l log_note"
+
+ATALKD_RUN=no
+PAPD_RUN=no
+TIMELORD_RUN=no
+#A2BOOT_RUN=no
+ATALK_ZONE=
+ATALK_BGROUND=no
. :ETCDIR:/netatalk.conf
case "$1" in
'start')
- if [ x"${ATALK_BGROUND}" = x"yes" ]; then
+ if [ x"${ATALK_BGROUND}" = x"yes" -a x"${ATALKD_RUN}" != x"no" ]; then
echo "Starting netatalk in the background ... "
atalk_startup > /dev/null &
else