]> arthur.barton.de Git - netatalk.git/commitdiff
added contributed SuSE init script with proper paths, etc
authorrufustfirefly <rufustfirefly>
Wed, 14 Feb 2001 15:43:28 +0000 (15:43 +0000)
committerrufustfirefly <rufustfirefly>
Wed, 14 Feb 2001 15:43:28 +0000 (15:43 +0000)
configure.in
distrib/initscripts/rc.atalk.suse.tmpl [new file with mode: 0755]

index 997b3f4ab9bbbabc75f2ea35812c3c828518d700..46572f7454ae97f966f688f7b6ebe784b2c00811 100644 (file)
@@ -296,6 +296,14 @@ AC_ARG_ENABLE(redhat,
        AC_MSG_RESULT([enabling redhat-style sysv support])
 )
 
+AC_ARG_ENABLE(suset,
+       [  --enable-suse       use suse-style sysv configuration ],
+    if test "$enableval" = "yes"; then
+               sysv_style=suse
+       fi
+       AC_MSG_RESULT([enabling suse-style sysv support])
+)
+
 AC_ARG_ENABLE(cobalt,
        [  --enable-cobalt     use cobalt-style sysv configuration ],
     if test "$enableval" = "yes"; then
@@ -470,6 +478,7 @@ AM_CONDITIONAL(USE_PAM, test x$compile_pam = xyes)
 AM_CONDITIONAL(USE_PGP, test x$compile_pgp = xyes)
 AM_CONDITIONAL(USE_COBALT, test x$sysv_style = xcobalt)
 AM_CONDITIONAL(USE_REDHAT, test x$sysv_style = xredhat)
+AM_CONDITIONAL(USE_SUSE, test x$sysv_style = xsuse)
 AM_CONDITIONAL(USE_TRU64, test x$sysv_style = xtru64)
 
 dnl --------------------- generate files
diff --git a/distrib/initscripts/rc.atalk.suse.tmpl b/distrib/initscripts/rc.atalk.suse.tmpl
new file mode 100755 (executable)
index 0000000..a5fbbb8
--- /dev/null
@@ -0,0 +1,64 @@
+#! /bin/sh
+# Copyright (c) 1996 S.u.S.E. GmbH Fuerth, Germany.  All rights reserved.
+#
+# Author: 
+#       Reinhold Sojer, <reinhold@suse.de>
+# 
+# adapted to 1.4.99 (at 00-11-15) : Thomas Schierle, <ts@visual-s.de>
+# template changes 2001-02-14     : jeff <jeff@univrel.pr.uconn.edu>
+
+. /etc/rc.config
+
+test -f :ETCDIR:/netatalk.conf || exit 0
+
+. :ETCDIR:/netatalk.conf
+
+# 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
+
+# The echo return value for success (defined in /etc/rc.config).
+return=$rc_done
+case "$1" in
+    start)
+        echo -n "Starting netatalk:"
+        :SBINDIR:/atalkd
+        :BINDIR:/nbprgstr -p 4 "${ATALK_NAME}:Workstation${ATALK_ZONE}"
+        :BINDIR:/nbprgstr -p 4 "${ATALK_NAME}:netatalk${ATALK_ZONE}"
+        startproc :SBINDIR:/papd || return=$rc_failed
+        startproc :SBINDIR:/timelord || return=$rc_failed
+        startproc :SBINDIR:/afpd ${AFPD_UAMLIST} -g ${AFPD_GUEST} \
+          -c ${AFPD_MAX_CLIENTS} -n "${ATALK_NAME}${ATALK_ZONE}" || \
+          return=$rc_failed
+        echo -e "$return"
+        ;;
+    stop)
+        echo -n "Shutting down netatalk:"
+        killproc -TERM :SBINDIR:/papd || return=$rc_failed
+        killproc -TERM :SBINDIR:/timelord || return=$rc_failed
+        killproc -TERM :SBINDIR:/afpd || return=$rc_failed
+        killproc -TERM :SBINDIR:/atalkd || return=$rc_failed
+        echo -e "$return"
+        ;;
+    restart|reload)
+        $0 stop && $0 start || return=$rc_failed
+        ;;
+    status)
+        echo -n "Checking for service atalk:"
+        checkproc :SBINDIR:/papd && echo -n "OK" || echo -n "No process"
+        checkproc :SBINDIR:/afpd && echo -n "OK" || echo "No process"
+        checkproc :SBINDIR:/atalkd && echo "OK" || echo "No process"
+        ;;
+    *)
+        echo "Usage: $0 {start|stop}"
+        exit 1
+        ;;
+esac
+
+# Inform the caller not only verbosely and set an exit status.
+test "$return" = "$rc_done" || exit 1
+exit 0