From 4d81bb451c2cc8d5ffac5cf4ad64d524ae55c66f Mon Sep 17 00:00:00 2001 From: Micah Anderson Date: Tue, 24 Jun 2008 19:53:36 +0000 Subject: fixed catifexec function to actually work, also now takes arguments that are passed, thanks to a report from John Hallam --- handlers/sys.in | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'handlers/sys.in') diff --git a/handlers/sys.in b/handlers/sys.in index 2c48883..9e6343f 100755 --- a/handlers/sys.in +++ b/handlers/sys.in @@ -188,10 +188,12 @@ catiffile () { } catifexec () { - echo $HASHES >> $sysreportfile - echo "# $STATUS" >> $sysreportfile - echo $HASHES >> $sysreportfile - $1 >> $sysreportfile 2>&1 || info "executing of $1 failed" + if [ -x $1 ]; then + echo $HASHES >> $sysreportfile + echo "# $STATUS" >> $sysreportfile + echo $HASHES >> $sysreportfile + $* >> $sysreportfile 2>&1 || info "executing of $1 failed" + fi } -- cgit v1.2.3