add wrapper to trick 2.6 kernel

This commit is contained in:
Mario Fetka
2017-11-11 03:29:22 +01:00
parent b28fe30370
commit 67bc9dc2a5
4 changed files with 18 additions and 5 deletions

5
debian/init vendored
View File

@@ -16,6 +16,7 @@ PATH=/sbin:/usr/sbin:/bin:/usr/bin
DESC="3ware 3DM2 RAID HBAs Management Utility"
NAME=3dm2
DAEMON=/usr/sbin/$NAME
DAEMON_REAL=/usr/lib/$NAME/$NAME.real
SCRIPTNAME=/etc/init.d/$NAME
LOCKFILE=/var/lock/subsys/3dm2
@@ -54,7 +55,7 @@ do_stop()
# 1 if daemon was already stopped
# 2 if daemon could not be stopped
# other if a failure occurred
start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --exec $DAEMON
start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --exec $DAEMON_REAL
RETVAL="$?"
[ "$RETVAL" = 2 ] && return 2
# Wait for children to finish too if this is a daemon that forks
@@ -63,7 +64,7 @@ do_stop()
# that waits for the process to drop all resources that could be
# needed by services started subsequently. A last resort is to
# sleep for some time.
start-stop-daemon --stop --quiet --oknodo --retry=0/30/KILL/5 --exec $DAEMON
start-stop-daemon --stop --quiet --oknodo --retry=0/30/KILL/5 --exec $DAEMON_REAL
[ "$?" = 2 ] && return 2
rm -f $LOCKFILE
return "$RETVAL"