aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHelge Deller <deller@gmx.de>2020-10-03 21:01:51 +0200
committerHelge Deller <deller@gmx.de>2020-10-03 21:01:51 +0200
commit528564d2664f75c7382964ba7e4556530e122ed4 (patch)
tree0f3437f5f0dd834d26e514c1f3e178263794253f
parentc12bf220afa24cf20c8c35046130035e1bf6af5a (diff)
downloadrbootd-528564d2664f75c7382964ba7e4556530e122ed4.tar.gz
init.d: Clean up rbootd init.d file, add status and LSB description
Suggested-by: Pierre-Elliott Bécue <peb@debian.org> Signed-off-by: Helge Deller <deller@gmx.de>
-rw-r--r--debian/changelog1
-rw-r--r--debian/rbootd.init.d30
2 files changed, 17 insertions, 14 deletions
diff --git a/debian/changelog b/debian/changelog
index 01a6bca..2e96423 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -11,6 +11,7 @@ rbootd (3.0) UNRELEASED; urgency=medium
* Add systemd unit file
* Convert to Debian native format
* Drop trailing spaces in debian/rules file
+ * Clean up rbootd init.d file, add status and LSB description
-- Helge Deller <deller@gmx.de> Thu, 24 Sep 2020 20:13:47 +0200
diff --git a/debian/rbootd.init.d b/debian/rbootd.init.d
index 3676c58..39753d2 100644
--- a/debian/rbootd.init.d
+++ b/debian/rbootd.init.d
@@ -1,22 +1,21 @@
#! /bin/sh
+#/etc/init.d/rbootd
+#
+# Skeleton written by Miquel van Smoorenburg <miquels@drinkel.ow.org>.
+# Modified for Debian GNU/Linux by Alan Bain <afrb2@cam.ac.uk>.
+# Modified for Debian GNU/Linux by Ian Murdock <imurdock@gnu.ai.mit.edu>.
+# Additions by Helge Deller <deller@gmx.de>.
### BEGIN INIT INFO
# Provides: rbootd
-# Required-Start: $remote_fs $syslog
-# Required-Stop: $remote_fs $syslog
+# Required-Start: $remote_fs $syslog $network
+# Required-Stop: $remote_fs $syslog $network
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
+# Short-Description: rbootd HP remote boot daemon
+# Description: rbootd is a daemon to provide boot images to HP machines
### END INIT INFO
-# rbootd init file. Modified from Debian skeleton by
-# Alan Bain <afrb2@cam.ac.uk>.
-#
-# Written by Miquel van Smoorenburg <miquels@cistron.nl>.
-# Modified for Debian GNU/Linux
-# by Ian Murdock <imurdock@gnu.ai.mit.edu>.
-#
-#
-
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
DAEMON=/usr/sbin/rbootd
NAME=rbootd
@@ -56,10 +55,10 @@ case "$1" in
# If the daemon responds to changes in its config file
# directly anyway, make this a do-nothing entry.
#
- echo "Reloading $DESC configuration files."
- start-stop-daemon --stop --oknodo --signal 1 --quiet --pidfile \
+ echo "Reloading $DESC configuration files."
+ start-stop-daemon --stop --oknodo --signal 1 --quiet --pidfile \
/var/run/$NAME.pid --exec $DAEMON
- ;;
+ ;;
restart)
#
# If the "reload" option is implemented, move the "force-reload"
@@ -74,6 +73,9 @@ case "$1" in
/var/run/$NAME.pid --exec $DAEMON $ARGS
echo "$NAME."
;;
+ status)
+ status_of_proc -p $PIDFILE $DAEMON rbootd && exit 0 || exit $?
+ ;;
*)
N=/etc/init.d/$NAME
# echo "Usage: $N {start|stop|restart|reload|force-reload}" >&2