#! /bin/sh
# Author: Petter Reinholdtsen <pere@hungry.com>
+# Author: Sven Hoexter <sven@timegate.de>
# License: GNU General Public License v2 or later
# mpt-statusd - Check mpt-status values in the background.
exit 0
fi
-#if ! [ -e "/proc/mpt/version" ] ; then
-# log_failure_msg "The mptctl module is missing."
-# exit 0
-#fi
+
+#Try to blindly load the mptctl module
+modprobe mptctl || true
+
+if ! [ -e "/proc/mpt/version" ] ; then
+ log_failure_msg "The mptctl module is missing."
+ exit 0
+fi
check_mpt() {
echo $$ > $PIDFILE.new && mv $PIDFILE.new $PIDFILE
# therefore can be used by a restart
d_stop_by_restart() {
if [ -f $PIDFILE ] ; then
- killproc -p $PIDFILE $SCRIPTNAME > /dev/null 2>&1
+ killproc -p $PIDFILE $SCRIPTNAME > /dev/null 2>&1
rm -f $PIDFILE
else
log_warning_msg "Daemon is already stopped."
case "$1" in
start)
- echo -n ""
echo -n $"Starting $DESC: $NAME"
d_start
;;
stop)
- log_begin_msg "Stopping $DESC: $NAME"
+ echo -n $"Stopping $DESC: $NAME"
d_stop
;;
check_mpt)