Small improvement to the init.d example file
authorIustin Pop <iustin@google.com>
Thu, 5 Feb 2009 14:08:56 +0000 (14:08 +0000)
committerIustin Pop <iustin@google.com>
Thu, 5 Feb 2009 14:08:56 +0000 (14:08 +0000)
The start_action function is changed so that it can be called with
arguments - this could be used to parse a defaults file, etc.

Reviewed-by: imsnah

doc/examples/ganeti.initd.in

index 8460216..8a9662c 100644 (file)
@@ -63,8 +63,11 @@ check_exitcode() {
 
 start_action() {
     # called as start_action daemon pidfile
-    log_action_begin_msg "$1"
-    start-stop-daemon --start --quiet --exec "$1" --pidfile "$2"
+    local daemon="$1"; shift
+    local pidfile="$2"; shift
+    log_action_begin_msg "$daemon"
+    start-stop-daemon --start --quiet --exec "$daemon" --pidfile "$pidfile" \
+        -- "$@"
     check_exitcode $?
 }