fixed catifexec function to actually work, also now takes arguments that are passed...
authormicah <micah@758a04ac-41e6-0310-8a23-8373a73cc35d>
Tue, 24 Jun 2008 19:53:36 +0000 (19:53 +0000)
committermicah <micah@758a04ac-41e6-0310-8a23-8373a73cc35d>
Tue, 24 Jun 2008 19:53:36 +0000 (19:53 +0000)
git-svn-id: http://code.autistici.org/svn/backupninja/trunk@579 758a04ac-41e6-0310-8a23-8373a73cc35d

ChangeLog
handlers/sys.in

index b56cab9a0903ca5fe5b5193e7b56713b44ae5fe1..df24adcba81ae324f271a296c67ed185115b1618 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -47,6 +47,8 @@ version 0.9.6 -- unreleased
           dup handler, with the new vsnames configuration option ; (Closes: Trac#45)
         . add support for capturing the package debconf selection states using
           debconf-get-selections
+        . fixed catifexec function to actually work, also now passes the arguments
+          given to catifexec() to the called command (Thanks John Hallam!)
 
 version 0.9.5 -- December 2, 2007
     backupninja changes
index 2c48883ce11576639a7ae7231249b59ccd840c6f..9e6343f79b8de792889b0a65ba4bbd7365a5cb11 100755 (executable)
@@ -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
 }