X-Git-Url: https://git.sven.stormbind.net/?a=blobdiff_plain;f=mpt-status.init;h=7fd67c9435dc14c9e9ae8fbe90bd0b878d73c6d0;hb=d9a242b63a4fa60dedc856ecce23c714a3f55cfc;hp=af69e06b2163d0eee5b797bcdede2c806542450d;hpb=92a17ae60f4fb696d6094e0038c9918582d537ff;p=sven%2Fmpt-status.git diff --git a/mpt-status.init b/mpt-status.init index af69e06..7fd67c9 100644 --- a/mpt-status.init +++ b/mpt-status.init @@ -6,7 +6,7 @@ # mpt-statusd - Check mpt-status values in the background. # -# chkconfig: 345 60 50 +# chkconfig: - # description: Check mpt-status values in the background \ # using daemonize and the mpt-status utility. @@ -14,8 +14,6 @@ # Provides: mpt-statusd # Required-Start: $remote_fs $syslog # Required-Stop: $remote_fs $syslog -# Default-Start: 2 3 4 5 -# Default-Stop: 0 1 6 # Short-Description: Check mpt-status values in the background. ### END INIT INFO @@ -41,10 +39,9 @@ test -x /usr/sbin/mpt-status || exit 0 # Source function library. . /etc/rc.d/init.d/functions -. /lib/lsb/init-functions if [ $RUN_DAEMON = "no" ] ; then - log_failure_msg $"mpt-statusd is disabled in /etc/default/mpt-statusd, not starting." + echo "mpt-statusd is disabled in /etc/default/mpt-statusd, not starting." && failure exit 0 fi @@ -53,7 +50,7 @@ fi modprobe mptctl || true if ! [ -e "/proc/mpt/version" ] ; then - log_failure_msg "The mptctl module is missing." + echo "The mptctl module is missing." && failure exit 0 fi @@ -137,7 +134,7 @@ check_daemon() { d_start() { [ -f $PIDFILE ] && PID="`cat $PIDFILE`" if [ "$PID" ] ; then - log_warning_msg "Daemon already running. Refusing to start another" + echo "Daemon already running. Refusing to start another" && warning return 0 elif check_daemon ; then # Use daemonize to turn it into a daemon and start it with daemon(). @@ -146,7 +143,7 @@ d_start() { [ $RETVAL -eq 0 ] && touch $LOCKFILE return $RETVAL else - log_warning_msg "Daemon is already running. Refusing to start another" + echo "Daemon is already running. Refusing to start another" && warning return 0 fi } @@ -163,11 +160,11 @@ d_stop() { rm -f $PIDFILE $LOCKFILE return 0 else - log_failure_msg "$NAME failed to stop" + echo "$NAME failed to stop" && failure return 1 fi else - log_warning_msg "$NAME is already stopped." + echo "$NAME is already stopped." && warning return 0 fi } @@ -179,7 +176,7 @@ d_stop_by_restart() { killproc -p $PIDFILE $SCRIPTNAME > /dev/null 2>&1 rm -f $PIDFILE $LOCKFILE else - log_warning_msg "Daemon is already stopped." + echo "Daemon is already stopped." && warning fi }