Add back the snf_image_activate_helper check
authorNikos Skalkotos <skalkoto@grnet.gr>
Wed, 26 Sep 2012 13:40:07 +0000 (16:40 +0300)
committerNikos Skalkotos <skalkoto@grnet.gr>
Wed, 26 Sep 2012 13:40:07 +0000 (16:40 +0300)
snf-image-helper/snf-image-helper.in

index 9a1bc10..c4f99d4 100644 (file)
@@ -33,8 +33,13 @@ fi
 
 set -e
 
-# terminate helper vm when the script exits
-add_cleanup system_poweroff
+if grep snf_image_activate_helper /proc/cmdline > /dev/null; then
+    # terminate helper vm when the script exits
+    add_cleanup system_poweroff
+else
+    log_error "Kernel command line activation flag: " \
+              "\`snf_image_activate_helper' is missing"
+fi
 
 if [ ! -b "$FLOPPY_DEV" ]; then
     log_error "Floppy device is not present!"