Allow hooks to take arguments that are specified when they are run
authorMartin Schwenke <martin@meltin.net>
Tue, 19 Feb 2013 01:42:39 +0000 (12:42 +1100)
committerMartin Schwenke <martin@meltin.net>
Tue, 19 Feb 2013 01:42:39 +0000 (12:42 +1100)
Signed-off-by: Martin Schwenke <martin@meltin.net>
autocluster

index f4a9b426b874bdf212c2f27825d22a4f19aa5b16..8d7ae2f572db715ae9c1b5de18b6caea36013f37 100755 (executable)
@@ -149,10 +149,11 @@ register_hook ()
 run_hooks ()
 {
     local hook_var="$1"
+    shift
 
     local i
     for i in ${!hook_var} ; do
-       $i
+       $i "$@"
     done
 }