git://git.onelab.eu
/
bootcd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
path for sleep wrong
[bootcd.git]
/
conf_files
/
pl_boot
diff --git
a/conf_files/pl_boot
b/conf_files/pl_boot
index
960995e
..
1d5abab
100644
(file)
--- a/
conf_files/pl_boot
+++ b/
conf_files/pl_boot
@@
-5,6
+5,9
@@
GNUPGHOME=/root
export GNUPGHOME
/usr/bin/gpg --yes 2>/dev/null </dev/null
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/
# 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
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
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
continue
fi
- echo "pl_boot: verifing downloaded script"
+ echo "pl_boot: verif
y
ing downloaded script"
rm -f $VERIFIED_SCRIPT
$GPG_CMD 2> /tmp/gpg_errors
if [ $? -ne 0 ]; then
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: downloaded script has returned"
done
-echo "pl_boot: automatic boot process canceled"
+echo "pl_boot: automatic boot process canceled
by user
"