# 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
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
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().
[ $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
}
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
}
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
}
Patch1: mpt-status.header_path.patch
Patch2: mpt-status.includes.patch
BuildRequires: pciutils-devel
-Requires: redhat-lsb, daemonize
+Requires: daemonize
Requires (preun): /sbin/chkconfig
Requires (preun): /sbin/service
Requires (post): /sbin/chkconfig