]> arthur.barton.de Git - netatalk.git/blobdiff - distrib/initscripts/rc.atalk.redhat.tmpl
don't load atalkd kernel module, either appletalk is not compiled or it will be loade...
[netatalk.git] / distrib / initscripts / rc.atalk.redhat.tmpl
index 1713f790cfd8982ed861dc6b96c2259048bbdf9d..96ae2a69d2c9161787de4765e1ba258da24d91d7 100644 (file)
@@ -19,13 +19,11 @@ ATALK_SBIN=:SBINDIR:
 # Source networking configuration.
 . /etc/sysconfig/network
 
-# Quickly probe for appletalk and warn if we can't find it
-/sbin/modprobe appletalk || echo "[could not load appletalk module]"
-
-# Check for IP Encapsulation support
-#/sbin/modprobe ipddp || echo "[could not load IP encapsulation]"
-
 if [ ! -x ${ATALK_SBIN}/atalkd ]; then
+     # Quickly probe for appletalk and warn if we can't find it
+     #/sbin/modprobe appletalk || echo "[could not load appletalk module]"
+     # Check for IP Encapsulation support
+     #/sbin/modprobe ipddp || echo "[could not load IP encapsulation]"
      echo "[${ATALK_SBIN}/atalkd not found.  Did it compile?]";
      exit 0;
 fi
@@ -48,6 +46,7 @@ fi
 RETVAL=1
 RETVAL_ATALKD=0
 RETVAL_PAPD=0
+RETVAL_CNID_METAD=0
 RETVAL_AFPD=0
 
 # startup code for everything
@@ -84,6 +83,27 @@ atalk_startup() {
            echo
        fi
 
+       # check for a2boot in bin directory
+       if [ x"${A2BOOT_RUN}" = x"yes"  -a -x ${ATALK_BIN}/a2boot ]; then
+           echo -n "  Starting a2boot"
+           daemon ${ATALK_BIN}/a2boot
+           echo
+       fi
+
+       # check for a2boot in sbin directory
+       if [ x"${A2BOOT_RUN}" = x"yes"  -a -x ${ATALK_SBIN}/a2boot ]; then
+           echo -n "  Starting a2boot"
+           daemon ${ATALK_SBIN}/a2boot
+           echo
+       fi
+
+    fi
+
+    if [ x"${CNID_METAD_RUN}" = x"yes" -a -x ${ATALK_SBIN}/cnid_metad ] ; then
+           echo -n "  Starting cnid_metad:"
+           daemon ${ATALK_SBIN}/cnid_metad
+           RETVAL_CNID_METAD=$?
+           echo
     fi
 
     if [ x"${AFPD_RUN}" = x"yes" -a -x ${ATALK_SBIN}/afpd ] ; then
@@ -94,7 +114,7 @@ atalk_startup() {
            echo
     fi
 
-    if [ $RETVAL_ATALKD -eq 0 -a $RETVAL_PAPD -eq 0 -a $RETVAL_AFPD -eq 0 ]; then
+    if [ $RETVAL_ATALKD -eq 0 -a $RETVAL_PAPD -eq 0 -a $RETVAL_CNID_METAD -eq 0 -a $RETVAL_AFPD -eq 0 ]; then
         RETVAL=0
        touch /var/lock/subsys/atalk || RETVAL=1
     fi
@@ -136,6 +156,20 @@ case "$1" in
                echo
            fi
 
+            # checking for a2boot in bin directory
+           if [ x"${A2BOOT_RUN}" = x"yes" -a -x ${ATALK_BIN}/a2boot ]; then
+               echo -n "  Stopping a2boot:"
+               killproc a2boot
+               echo
+           fi
+
+            # checking for a2boot in sbin directory
+           if [ x"${A2BOOT_RUN}" = x"yes" -a -x ${ATALK_SBIN}/a2boot ]; then
+               echo -n "  Stopping a2boot:"
+               killproc a2boot
+               echo
+           fi
+
            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}\"
 
@@ -156,6 +190,13 @@ case "$1" in
            echo
        fi
 
+       if [ x"${CNID_METAD_RUN}" = x"yes" -a -x ${ATALK_SBIN}/cnid_metad ]; then
+           echo -n "  Stopping cnid_metad:"
+           killproc cnid_metad
+           RETVAL_CNID_METAD=$?
+           echo
+       fi
+
        if [ $RETVAL_ATALKD -eq 0 -a $RETVAL_PAPD -eq 0 -a $RETVAL_AFPD -eq 0 ] ; then
            RETVAL=0
            rm -f /var/lock/subsys/atalk || RETVAL=1