path for sleep wrong
[bootcd.git] / conf_files / pl_boot
index 960995e..1d5abab 100644 (file)
@@ -5,6 +5,9 @@ GNUPGHOME=/root
 export GNUPGHOME
 /usr/bin/gpg --yes 2>/dev/null </dev/null
 
+# if this file is present, cancel the boot (exit this script)
+CANCEL_BOOT_FLAG=/tmp/CANCEL_BOOT
+
 # where all the configuration files for contacting
 # the boot server are stored
 BOOT_DIR=/usr/boot/
@@ -64,6 +67,11 @@ GPG_CMD="/usr/bin/gpg \
 first=1
 while true; do
 
+    if [[ -f $CANCEL_BOOT_FLAG ]]; then
+       echo "pl_boot: got request to cancel boot, exiting"
+       exit 0
+    fi
+
     if [[ $first -eq 0 ]]; then
        echo "pl_boot: fetching new script in 30 seconds"
        /bin/sleep 30
@@ -86,7 +94,7 @@ while true; do
        continue
     fi 
 
-    echo "pl_boot: verifing downloaded script"
+    echo "pl_boot: verifying downloaded script"
     rm -f $VERIFIED_SCRIPT
     $GPG_CMD 2> /tmp/gpg_errors
     if [ $? -ne 0 ]; then
@@ -105,4 +113,4 @@ while true; do
     echo "pl_boot: downloaded script has returned"
 done
 
-echo "pl_boot: automatic boot process canceled"
+echo "pl_boot: automatic boot process canceled by user"