]> arthur.barton.de Git - netatalk.git/commitdiff
Merge remote-tracking branch 'remotes/origin/branch-netatalk-2-1'
authorHAT <hat@fa2.so-net.ne.jp>
Sat, 4 Jun 2011 16:34:36 +0000 (01:34 +0900)
committerHAT <hat@fa2.so-net.ne.jp>
Sat, 4 Jun 2011 16:34:36 +0000 (01:34 +0900)
1  2 
NEWS
distrib/initscripts/rc.atalk.suse.tmpl

diff --cc NEWS
Simple merge
index 886591bcd8a98a7067d1f09967df84d3ea3393d8,c8a63f6d78bbfa493fb69ca25fd88e7883dc3af9..d99d429e897db8d934cec31dd35086c540fc53a9
@@@ -7,67 -7,43 +7,61 @@@
  # 
  ### BEGIN INIT INFO
  # Provides:       netatalk
- # Required-Start: $network $named $remote_fs $syslog
- # Required-Stop:
+ # Required-Start: $local_fs
+ # Required-Stop: $local_fs
+ # Should-Start:  $network $named $remote_fs $syslog slpd
+ # Should-Stop:   $remote_fs $network $syslog
  # Default-Start:  3 5
  # Default-Stop:
- # Description:    AFP over TCP and legacy Appletalk daemons
+ # Description:    AFP over TCP and legacy AppleTalk daemons
  ### END INIT INFO
  
- test -f /etc/rc.config && {
- . /etc/rc.config
- # Determine the base and follow a runlevel link name.
- base=${0##*/}
- link=${base#*[SK][0-9][0-9]}
- # Force execution if not called by a runlevel directory.
- test $link = $base && START_ATALK=yes
- test "$START_ATALK" = "yes" || exit 0
- test -f /etc/rc.status && . /etc/rc.status
- # The echo return value for success (defined in /etc/rc.config).
- 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
 +
+ . /etc/rc.status
  . :ETCDIR:/netatalk.conf
  
  # startup code for everything
  atalk_startup() {
      if [ x"${ATALKD_RUN}" != x"no" ]; then 
-       echo -n "  Starting atalkd:"
-       :SBINDIR:/atalkd
+       echo -n "  Starting atalkd ... "
+       :SBINDIR:/atalkd ; my_ec=$?
  
-       if [ -x :BINDIR:/nbprgstr ]; then       
+       if [ -x :BINDIR:/nbprgstr -a "$my_ec" = "0" ]; then     
+           echo -n ".. "
 -          :BINDIR:/nbprgstr -p 4 `hostname|sed 's/\..*$//'`:Workstation
 +          :BINDIR:/nbprgstr -p 4 ${ATALK_NAME}:Workstation
+           echo -n ". "
 -          :BINDIR:/nbprgstr -p 4 `hostname|sed 's/\..*$//'`:netatalk
 +          :BINDIR:/nbprgstr -p 4 ${ATALK_NAME}:netatalk
        fi      
+       if [ "$my_ec" != "0" ] ; then false ; fi
+       rc_status -v
+       
+       rc_reset
  
        if [ x"${PAPD_RUN}" = x"yes"  -a -x :SBINDIR:/papd ]; then
-           echo -n "  Starting papd:"
+           echo -n "  Starting papd"
            :SBINDIR:/papd
+           rc_status -v
        fi
  
+       rc_reset
        if [ x"${TIMELORD_RUN}" = x"yes"  -a -x :SBINDIR:/timelord ]; then
            echo -n "  Starting timelord"
            :SBINDIR:/timelord
  
  case "$1" in
      start)
 -      if [ x"${ATALK_BGROUND}" = x"yes" ]; then 
+       if test ! -z "$UID" -a "$UID" != 0 ; then
+               echo "you have to be root to start netatalk daemons"
+               rc_failed
+       else
-           echo "Starting netatalk in the background ... "
 +      if [ x"${ATALK_BGROUND}" = x"yes" -a x"${ATALKD_RUN}" != x"no" ]; then 
+           echo -n "Starting netatalk in the background ..."
            atalk_startup >& /dev/null &
+           rc_status -v
        else
            echo "Starting netatalk (this may take a while) ..."
            atalk_startup