blob: c8afe60ee87cbca4cdee65098b46afea56c78287 [file] [log] [blame]
Brad Bishop6e60e8b2018-02-01 10:27:11 -05001From 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'.
Patrick Williams8b8bc412016-08-17 15:02:23 -050013
14Upstream-Status: Inappropriate [configuration]
15
Brad Bishop6e60e8b2018-02-01 10:27:11 -050016Signed-off-by: Petter Mabรคcker <petter@technux.se>
17---
18 debian/pi-blaster.init | 38 +++++++-------------------------------
19 1 file changed, 7 insertions(+), 31 deletions(-)
Patrick Williams8b8bc412016-08-17 15:02:23 -050020
Brad Bishop6e60e8b2018-02-01 10:27:11 -050021diff --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
Patrick Williams8b8bc412016-08-17 15:02:23 -050026 [ -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
Brad Bishop6e60e8b2018-02-01 10:27:11 -050040@@ -77,48 +77,24 @@ do_stop()
Patrick Williams8b8bc412016-08-17 15:02:23 -050041
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"
Brad Bishop6e60e8b2018-02-01 10:27:11 -050070+ echo "Restarting $DESC" "$NAME"
Patrick Williams8b8bc412016-08-17 15:02:23 -050071 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
Brad Bishop6e60e8b2018-02-01 10:27:11 -050086+ do_start
Patrick Williams8b8bc412016-08-17 15:02:23 -050087 ;;
88 *)
89- echo "Usage: $SCRIPTNAME {start|stop|status|restart|force-reload}" >&2
Brad Bishop6e60e8b2018-02-01 10:27:11 -050090+ echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2
Patrick Williams8b8bc412016-08-17 15:02:23 -050091 exit 3
92 ;;
93 esac
Brad Bishop6e60e8b2018-02-01 10:27:11 -050094--
951.9.1
96