From b8e5a55d927ff7621b59a7403a91e1cada608ebc Mon Sep 17 00:00:00 2001 From: Jakub Bogusz Date: Thu, 25 Dec 2008 08:08:30 +0000 Subject: [PATCH] - added try-restart, force-reload (required by LSB) Changed files: VirtualBox-vboxnetflt.init -> 1.2 --- VirtualBox-vboxnetflt.init | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/VirtualBox-vboxnetflt.init b/VirtualBox-vboxnetflt.init index d4e7050..f17f007 100644 --- a/VirtualBox-vboxnetflt.init +++ b/VirtualBox-vboxnetflt.init @@ -32,6 +32,15 @@ stop() { rm -f /var/lock/subsys/vboxnetflt } +condrestart() { + if [ -f /var/lock/subsys/vboxnetflt ]; then + stop + start + else + RETVAL=$1 + fi +} + RETVAL=0 # See how we were called. case "$1" in @@ -45,6 +54,12 @@ case "$1" in stop start ;; + try-restart) + condrestart 0 + ;; + force-reload) + condrestart 7 + ;; status) if ! is_module $VBOX_MODULE; then echo "$VBOX_MODULE module is loaded" @@ -54,7 +69,7 @@ case "$1" in fi ;; *) - msg_usage "$0 {start|stop|restart|status}" + msg_usage "$0 {start|stop|restart|try-restart|force-reload|status}" exit 3 esac -- 2.43.0