1From 1338f98a279616f4e5e9ea30a25d1dfa0c7df5d6 Mon Sep 17 00:00:00 2001 2From: =?UTF-8?q?Petter=20Mab=C3=A4cker?= <petter@technux.se> 3Date: Sun, 4 Jun 2017 12:22:40 +0200 4Subject: [PATCH] Remove dependencies on LSB functions 5MIME-Version: 1.0 6Content-Type: text/plain; charset=UTF-8 7Content-Transfer-Encoding: 8bit 8 9See this as a rebase of the previous 'Remove dependencies on LSB 10functions patch' with only minor modifications from the original version, 11based on the work done by Alex Lennon <ajlennon@dynamicdevices.co.uk> in 12'25fd817 pi-blaster: Added recipe'. 13 14Upstream-Status: Inappropriate [configuration] 15 16Signed-off-by: Petter Mabäcker <petter@technux.se> 17--- 18 debian/pi-blaster.init | 38 +++++++------------------------------- 19 1 file changed, 7 insertions(+), 31 deletions(-) 20 21diff --git a/debian/pi-blaster.init b/debian/pi-blaster.init 22index b142d70..01a686c 100644 23--- a/debian/pi-blaster.init 24+++ b/debian/pi-blaster.init 25@@ -28,12 +28,12 @@ SCRIPTNAME=/etc/init.d/$NAME 26 [ -r /etc/default/$NAME ] && . /etc/default/$NAME 27 28 # Load the VERBOSE setting and other rcS variables 29-. /lib/init/vars.sh 30+#. /lib/init/vars.sh 31 32 # Define LSB log_* functions. 33 # Depend on lsb-base (>= 3.2-14) to ensure that this file is present 34 # and status_of_proc is working. 35-. /lib/lsb/init-functions 36+#. /lib/lsb/init-functions 37 38 # 39 # Function that starts the daemon/service 40@@ -77,48 +77,24 @@ do_stop() 41 42 case "$1" in 43 start) 44- [ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME" 45+ [ "$VERBOSE" != no ] && echo "Starting $DESC" "$NAME" 46 do_start 47- case "$?" in 48- 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;; 49- 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;; 50- esac 51 ;; 52 stop) 53- [ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME" 54+ [ "$VERBOSE" != no ] && echo "Stopping $DESC" "$NAME" 55 do_stop 56- case "$?" in 57- 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;; 58- 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;; 59- esac 60- ;; 61- status) 62- status_of_proc "$DAEMON" "$NAME" && exit 0 || exit $? 63 ;; 64 restart|force-reload) 65 # 66 # If the "reload" option is implemented then remove the 67 # 'force-reload' alias 68 # 69- log_daemon_msg "Restarting $DESC" "$NAME" 70+ echo "Restarting $DESC" "$NAME" 71 do_stop 72- case "$?" in 73- 0|1) 74- do_start 75- case "$?" in 76- 0) log_end_msg 0 ;; 77- 1) log_end_msg 1 ;; # Old process is still running 78- *) log_end_msg 1 ;; # Failed to start 79- esac 80- ;; 81- *) 82- # Failed to stop 83- log_end_msg 1 84- ;; 85- esac 86+ do_start 87 ;; 88 *) 89- echo "Usage: $SCRIPTNAME {start|stop|status|restart|force-reload}" >&2 90+ echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2 91 exit 3 92 ;; 93 esac 94-- 951.9.1 96 97