Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 1 | From 1338f98a279616f4e5e9ea30a25d1dfa0c7df5d6 Mon Sep 17 00:00:00 2001 |
| 2 | From: =?UTF-8?q?Petter=20Mab=C3=A4cker?= <petter@technux.se> |
| 3 | Date: Sun, 4 Jun 2017 12:22:40 +0200 |
| 4 | Subject: [PATCH] Remove dependencies on LSB functions |
| 5 | MIME-Version: 1.0 |
| 6 | Content-Type: text/plain; charset=UTF-8 |
| 7 | Content-Transfer-Encoding: 8bit |
| 8 | |
| 9 | See this as a rebase of the previous 'Remove dependencies on LSB |
| 10 | functions patch' with only minor modifications from the original version, |
| 11 | based on the work done by Alex Lennon <ajlennon@dynamicdevices.co.uk> in |
| 12 | '25fd817 pi-blaster: Added recipe'. |
Patrick Williams | 8b8bc41 | 2016-08-17 15:02:23 -0500 | [diff] [blame] | 13 | |
| 14 | Upstream-Status: Inappropriate [configuration] |
| 15 | |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 16 | Signed-off-by: Petter Mabรคcker <petter@technux.se> |
| 17 | --- |
| 18 | debian/pi-blaster.init | 38 +++++++------------------------------- |
| 19 | 1 file changed, 7 insertions(+), 31 deletions(-) |
Patrick Williams | 8b8bc41 | 2016-08-17 15:02:23 -0500 | [diff] [blame] | 20 | |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 21 | diff --git a/debian/pi-blaster.init b/debian/pi-blaster.init |
| 22 | index 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 Williams | 8b8bc41 | 2016-08-17 15:02:23 -0500 | [diff] [blame] | 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 |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 40 | @@ -77,48 +77,24 @@ do_stop() |
Patrick Williams | 8b8bc41 | 2016-08-17 15:02:23 -0500 | [diff] [blame] | 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" |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 70 | + echo "Restarting $DESC" "$NAME" |
Patrick Williams | 8b8bc41 | 2016-08-17 15:02:23 -0500 | [diff] [blame] | 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 |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 86 | + do_start |
Patrick Williams | 8b8bc41 | 2016-08-17 15:02:23 -0500 | [diff] [blame] | 87 | ;; |
| 88 | *) |
| 89 | - echo "Usage: $SCRIPTNAME {start|stop|status|restart|force-reload}" >&2 |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 90 | + echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2 |
Patrick Williams | 8b8bc41 | 2016-08-17 15:02:23 -0500 | [diff] [blame] | 91 | exit 3 |
| 92 | ;; |
| 93 | esac |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 94 | -- |
| 95 | 1.9.1 |
| 96 | |