From: waszi Date: Thu, 16 Mar 2000 06:19:17 +0000 (+0000) Subject: - rewrited with new functions X-Git-Tag: autofs-4_0_0pre6-1~1 X-Git-Url: http://git.pld-linux.org/?a=commitdiff_plain;ds=sidebyside;h=733b034aa0d4890482e98ecaa0875b6c678594c4;p=packages%2Fautofs.git - rewrited with new functions Changed files: autofs.init -> 1.12 --- diff --git a/autofs.init b/autofs.init index 0e97437..0cd4433 100644 --- a/autofs.init +++ b/autofs.init @@ -20,14 +20,15 @@ . /etc/sysconfig/network # Demon specified configuration. -. /etc/sysconfig/autofs +[ -f /etc/sysconfig/autofs ] && . /etc/sysconfig/autofs # Check that networking is up. -if [ "${NETWORKING}" = "no" ]; then - echo "WARNING: Networking is down. Autofs service can't be runed." - exit 1 +if is_no "${NETWORKING}"; then + # nls "ERROR: Networking is down. %s can't be run." + msg_Network_Down automounter + exit 1 fi - + DAEMON=/usr/sbin/automount # @@ -95,28 +96,31 @@ case "$1" in start) # Check if the service is already running? if [ ! -f /var/lock/subsys/automount ]; then - show Starting automounter + msg_starting automounter busy if getmounts | sh; then deltext;ok else deltext;ok fi + RETVAL=$? + [ $RETVAL -eq 0 ] && touch /var/lock/subsys/automount else - echo "automount already is running" + msg_Already_Running automounter + exit 1 fi - touch /var/lock/subsys/automount ;; stop) - show Stopping automounter - killproc automount -TERM - rm -f /var/lock/subsys/automount + if [ -f /var/lock/subsys/automount ]; then + msg_stopping automount -TERM + killproc automount + rm -f /var/lock/subsys/automount >/dev/null 2>&1 + else + msg_Not_Running automounter + exit 1 + fi ;; - restart|reload) - if [ ! -f /var/lock/subsys/automount ]; then - echo "Automounter not running" - exit 1 - fi + restart) $0 stop $0 start ;; @@ -130,8 +134,8 @@ case "$1" in ) ;; *) - echo "Usage: $0 {start|stop|restart|reload|status}" + msg_Usage: "$0 {start|stop|restart|status}" exit 1 esac -exit 0 +exit $RETVAL