]> arthur.barton.de Git - netatalk.git/commitdiff
maintenance of initscripts and netatalk.conf.
authorHAT <hat@fa2.so-net.ne.jp>
Sat, 8 Jan 2011 17:25:09 +0000 (02:25 +0900)
committerHAT <hat@fa2.so-net.ne.jp>
Sat, 8 Jan 2011 17:25:09 +0000 (02:25 +0900)
ATALK_BGROUND is not important any longer.
Ubuntu's ATALK_NAME was empty.

config/netatalk.conf
distrib/initscripts/rc.atalk.bsd.tmpl
distrib/initscripts/rc.atalk.debian.tmpl
distrib/initscripts/rc.atalk.gentoo.tmpl
distrib/initscripts/rc.atalk.redhat.tmpl
distrib/initscripts/rc.atalk.suse.tmpl
distrib/initscripts/rc.atalk.sysv.tmpl

index f1fa38dd1db17ec6802662d212f5cd4266ea8fe9..b8c1e67b731325483351384e5f7a87c5c631efc9 100644 (file)
@@ -4,57 +4,57 @@
 # 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
index 05010b7ba320b9b6f3cbfad4b1af6177f8287553..6a0f489a27db73014cf0661c683a1e3f98913f94 100755 (executable)
 ##     /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}
@@ -26,8 +44,8 @@ if [ -x :SBINDIR:/atalkd ]; then
 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
@@ -37,12 +55,14 @@ if [ -x :SBINDIR:/papd -a X"${PAPD_RUN}" != X"no" ]; then
 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
index 6f5d9f0b8185e15b1149a5566d95b8ff5ac5e41c..e3e7f56896581c69b0a241f52ccb8b732983972f 100644 (file)
@@ -9,7 +9,6 @@
 #
 # 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
 
@@ -22,15 +21,24 @@ SCRIPTNAME=/etc/init.d/$NAME
 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
@@ -43,7 +51,7 @@ atalk_startup() {
 
        # 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.
@@ -83,7 +91,7 @@ atalk_startup() {
 
 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
index c75ed74b9d0dbfbfabbffd396da62ca5cf2c69a2..206e01ca072e0221a4c7b9ce44f61ab6dbccd836 100644 (file)
@@ -5,6 +5,24 @@
 # 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
@@ -60,7 +78,7 @@ atalk_startup () {
 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
index bdcd9f0f8c5491a70f1f17fb877edb2cfe1915ed..79b613bd69b614afb1200af5c1f07c67946ddd52 100644 (file)
@@ -19,6 +19,25 @@ ATALK_SBIN=:SBINDIR:
 # 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
@@ -120,7 +139,7 @@ atalk_startup() {
 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
index c9a0bec35039219b4841d3c0b5c3de90bc4d85f9..886591bcd8a98a7067d1f09967df84d3ea3393d8 100755 (executable)
@@ -30,6 +30,25 @@ test -f /etc/rc.status && . /etc/rc.status
 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
@@ -39,8 +58,8 @@ atalk_startup() {
        :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      
 
@@ -74,7 +93,7 @@ atalk_startup() {
 
 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
index f21c7ec9dff80981b5cae7dd1c6cbbf47f5838d7..a4b9a69ef94cbcb3443e7a76a697f966b9cea2e3 100755 (executable)
@@ -18,8 +18,24 @@ killproc() {
        [ "$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
 
@@ -67,7 +83,7 @@ atalk_startup() {
 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