|
@@ -1,7 +1,7 @@
|
|
|
Subject: Improve init scripts
|
|
|
Author: Christoph Biedl <debian.axhn@manchmal.in-ulm.de>
|
|
|
-Date: 2018-09-23
|
|
|
Forwarded: not-yet
|
|
|
+Last-Update: 2024-06-19
|
|
|
|
|
|
--- a/contrib/persistence/vblade.init.in
|
|
|
+++ b/contrib/persistence/vblade.init.in
|
|
@@ -64,7 +64,12 @@ Forwarded: not-yet
|
|
|
status)
|
|
|
--- a/contrib/persistence/vblade.init.lsb-daemon
|
|
|
+++ b/contrib/persistence/vblade.init.lsb-daemon
|
|
|
-@@ -25,10 +25,18 @@
|
|
|
+@@ -22,13 +22,23 @@
|
|
|
+ [ -x "$VBLADE" ] || exit 0
|
|
|
+ [ -x "$DAEMON" ] || exit 0
|
|
|
+
|
|
|
++. /usr/lib/lsb/init-functions
|
|
|
++
|
|
|
mkdir -p "$PIDDIR"
|
|
|
|
|
|
# Load the VERBOSE setting and other rcS variables
|
|
@@ -85,7 +90,7 @@ Forwarded: not-yet
|
|
|
|
|
|
# Start a vblade instance
|
|
|
#
|
|
|
-@@ -37,8 +45,10 @@
|
|
|
+@@ -37,8 +47,10 @@
|
|
|
# 1 if daemon was already running
|
|
|
# 2 if daemon could not be started
|
|
|
do_start () {
|
|
@@ -98,7 +103,7 @@ Forwarded: not-yet
|
|
|
|
|
|
sh -n "$CONFIG" 2>/dev/null || return 2
|
|
|
|
|
|
-@@ -51,10 +61,10 @@
|
|
|
+@@ -51,10 +63,10 @@
|
|
|
|
|
|
. "$CONFIG"
|
|
|
|
|
@@ -113,7 +118,7 @@ Forwarded: not-yet
|
|
|
|
|
|
if [ "$ionice" ] ; then
|
|
|
if [ -x "$IONICE" ] ; then
|
|
|
-@@ -77,6 +87,12 @@
|
|
|
+@@ -77,6 +89,12 @@
|
|
|
--stdout daemon.notice \
|
|
|
--stderr daemon.err -- \
|
|
|
$VBLADE $options $shelf $slot $netif $filename || return 2
|
|
@@ -126,7 +131,7 @@ Forwarded: not-yet
|
|
|
}
|
|
|
|
|
|
# Stop a vblade instance
|
|
|
-@@ -99,12 +115,14 @@
|
|
|
+@@ -99,12 +117,14 @@
|
|
|
--pidfiles "$PIDDIR" \
|
|
|
--stop || return 2
|
|
|
# Wait until the process is gone
|
|
@@ -142,7 +147,7 @@ Forwarded: not-yet
|
|
|
return 2
|
|
|
}
|
|
|
|
|
|
-@@ -121,7 +139,10 @@
|
|
|
+@@ -121,7 +141,10 @@
|
|
|
do_start "$INSTANCE" "$CONFIG"
|
|
|
case "$?" in
|
|
|
0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
|
|
@@ -154,7 +159,7 @@ Forwarded: not-yet
|
|
|
esac
|
|
|
;;
|
|
|
stop)
|
|
|
-@@ -129,7 +150,10 @@
|
|
|
+@@ -129,7 +152,10 @@
|
|
|
do_stop "$INSTANCE"
|
|
|
case "$?" in
|
|
|
0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
|