summaryrefslogtreecommitdiff
path: root/etc
diff options
context:
space:
mode:
authorJoerg Jaspert <joerg@debian.org>2008-11-09 10:14:10 +0100
committerJoerg Jaspert <joerg@debian.org>2008-11-09 10:14:10 +0100
commitcb8898624941a1d4b1e8dcdf2179ad052c025a34 (patch)
treee44cfd12fa87b56d57a4b3b3d205434ece8add1a /etc
parent4ac64013d53a80b5dd2952a35a2754d71666386f (diff)
Let hooks also work with arguments.
Thanks to ISHIKAWA Mutsumi and Damin Viano Signed-off-by: Joerg Jaspert <joerg@debian.org>
Diffstat (limited to 'etc')
-rw-r--r--etc/common4
1 files changed, 2 insertions, 2 deletions
diff --git a/etc/common b/etc/common
index eae394e..6a8d7a2 100644
--- a/etc/common
+++ b/etc/common
@@ -133,8 +133,8 @@ error () {
# needs array variable HOOK setup with HOOKNR being a number an HOOKSCR
# the script to run.
hook () {
- ARGS="HOOK[*]"
- local ${!ARGS}
+ ARGS='HOOK[@]'
+ local "${!ARGS}"
if [ -n "${HOOKSCR}" ]; then
log "Running hook $HOOKNR: ${HOOKSCR}"
set +e