]> arthur.barton.de Git - netatalk.git/commitdiff
overhaul of redhat initscript by Ryan Cleary (tryanc) (#418094)
authorrufustfirefly <rufustfirefly>
Tue, 1 May 2001 13:35:23 +0000 (13:35 +0000)
committerrufustfirefly <rufustfirefly>
Tue, 1 May 2001 13:35:23 +0000 (13:35 +0000)
distrib/initscripts/rc.atalk.redhat.tmpl

index bbe4922d9bd8ff43cbead0a54877d838c88559b0..873391ee6555bff9d1b5a88fb371706c0ee761b8 100644 (file)
@@ -44,35 +44,45 @@ RETVAL_AFPD=0
 # startup code for everything
 atalk_startup() {
     if [ x"${ATALKD_RUN}" != x"no" ]; then 
+       echo -n "  Starting atalkd:"
        daemon ${ATALK_SBIN}/atalkd
        RETVAL_ATALKD=$?
+       echo
 
        if [ -x ${ATALK_BIN}/nbprgstr ]; then   
-           ${ATALK_BIN}/nbprgstr -p 4 "${ATALK_NAME}:Workstation${ATALK_ZONE}"
-           ${ATALK_BIN}/nbprgstr -p 4 "${ATALK_NAME}:netatalk${ATALK_ZONE}"
+           action "  Registering ${ATALK_NAME}:Workstation${ATALK_ZONE}:" ${ATALK_BIN}/nbprgstr -p 4 \"${ATALK_NAME}:Workstation${ATALK_ZONE}\"
+           action "  Registering ${ATALK_NAME}:netatalk${ATALK_ZONE}:" ${ATALK_BIN}/nbprgstr -p 4 \"${ATALK_NAME}:netatalk${ATALK_ZONE}\"
        fi      
 
        if [ x"${PAPD_RUN}" = x"yes"  -a -x ${ATALK_SBIN}/papd ]; then
+           echo -n "  Starting papd:"
            daemon ${ATALK_SBIN}/papd
            RETVAL_PAPD=$?
+           echo
        fi
 
        # check for timelord in bin directory
        if [ x"${TIMELORD_RUN}" = x"yes"  -a -x ${ATALK_BIN}/timelord ]; then
+           echo -n "  Starting timelord"
            daemon ${ATALK_BIN}/timelord
+           echo
        fi
 
        # check for timelord in sbin directory
        if [ x"${TIMELORD_RUN}" = x"yes"  -a -x ${ATALK_SBIN}/timelord ]; then
+           echo -n "  Starting timelord"
            daemon ${ATALK_SBIN}/timelord
+           echo
        fi
 
     fi
 
     if [ x"${AFPD_RUN}" = x"yes" -a -x ${ATALK_SBIN}/afpd ] ; then
+           echo -n "  Starting afpd:"
            daemon ${ATALK_SBIN}/afpd ${AFPD_UAMLIST} -g ${AFPD_GUEST} \
-               -c ${AFPD_MAX_CLIENTS} -n "${ATALK_NAME}${ATALK_ZONE}"
+               -c ${AFPD_MAX_CLIENTS} -n \"${ATALK_NAME}${ATALK_ZONE}\"
            RETVAL_AFPD=$?
+           echo
     fi
 
     if [ $RETVAL_ATALKD -eq 0 -a $RETVAL_PAPD -eq 0 -a $RETVAL_AFPD -eq 0 ]; then
@@ -88,42 +98,53 @@ case "$1" in
            echo -n "(backgrounded)"
            atalk_startup >& /dev/null &
        else
+           echo
            atalk_startup
        fi
        echo 
        ;;
 'stop')
-       echo -n 'Shutting down AppleTalk services: '
+       echo 'Shutting down AppleTalk services: '
        if [ x"${ATALKD_RUN}" != x"no" ]; then
            if [ x"${PAPD_RUN}" = x"yes" -a -x ${ATALK_SBIN}/papd ]; then
+               echo -n "  Stopping papd:"
                killproc papd
                RETVAL_PAPD=$?
+               echo
            fi
 
             # checking for timelord in bin directory
            if [ x"${TIMELORD_RUN}" = x"yes" -a -x ${ATALK_BIN}/timelord ]; then
+               echo -n "  Stopping timelord:"
                killproc timelord
+               echo
            fi
 
             # checking for timelord in sbin directory
            if [ x"${TIMELORD_RUN}" = x"yes" -a -x ${ATALK_SBIN}/timelord ]; then
+               echo -n "  Stopping timelord:"
                killproc timelord
+               echo
            fi
 
-           ${ATALK_BIN}/nbpunrgstr "${ATALK_NAME}:Workstation${ATALK_ZONE}"
-           ${ATALK_BIN}/nbpunrgstr "${ATALK_NAME}:netatalk${ATALK_ZONE}"
+           action "  Unregistering ${ATALK_NAME}:Workstation${ATALK_ZONE}:" ${ATALK_BIN}/nbpunrgstr \"${ATALK_NAME}:Workstation${ATALK_ZONE}\"
+           action "  Unregistering ${ATALK_NAME}:netatalk${ATALK_ZONE}:" ${ATALK_BIN}/nbpunrgstr \"${ATALK_NAME}:netatalk${ATALK_ZONE}\"
 
            # kill atalkd last, since without it the plumbing goes away.
            if [ -x ${ATALK_SBIN}/atalkd ]; then
+               echo -n "  Stopping atalk:"
                killproc atalkd
                RETVAL_ATALKD=$?
+               echo
            fi
        fi
 
        # kill this separately as we also do AFP/tcp
        if [ x"${AFPD_RUN}" = x"yes" -a -x ${ATALK_SBIN}/afpd ]; then
+           echo -n "  Stopping afpd:"
            killproc afpd
            RETVAL_AFPD=$?
+           echo
        fi
 
        if [ $RETVAL_ATALKD -eq 0 -a $RETVAL_PAPD -eq 0 -a $RETVAL_AFPD -eq 0 ] ; then