Fixed display of action conditions.
authorValentin Vidic <vvidic@carnet.hr>
Mon, 10 Mar 2008 09:37:36 +0000 (10:37 +0100)
committerValentin Vidic <vvidic@carnet.hr>
Mon, 10 Mar 2008 09:37:36 +0000 (10:37 +0100)
src/functions.sh

index 22ba7a6..27c6133 100644 (file)
@@ -229,8 +229,8 @@ run_actions() {
     check=$(echo "$line" | sed 's/             */      /g'| awk -F'    ' '{print $1}')
     action=$(echo "$line" | sed 's/            */      /g'| awk -F'    ' '{print $2}')
     checkmsg=""
-    [ "$test" != "true" ] && checkmsg="if '$test'"
-    if eval $test; then
+    [ "$check" != "true" ] && checkmsg="if '$check'"
+    if eval $check; then
       log "$(printf 'action %02d' $lineno) starting: '${action}' $checkmsg "
       eval $action
       log "$(printf 'action %02d' $lineno) finished: '${action}' $checkmsg"