summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xnfs/autorun.sh17
1 files changed, 12 insertions, 5 deletions
diff --git a/nfs/autorun.sh b/nfs/autorun.sh
index 4d6461a..7c642d1 100755
--- a/nfs/autorun.sh
+++ b/nfs/autorun.sh
@@ -1,6 +1,11 @@
#!/bin/busybox sh
-read -t10 -p 'Press Enter or wait 10 sec...' # Let the user read machine_info and other usefull informations on console (or skip with Enter)
-echo -e '\n\n\n\n\n' # Make some blank lines on console
+
+rest10() {
+ # Let the user read machine_info and other usefull informations on console (or skip with Enter)
+ read -t10 -p 'Press Enter or wait 10 sec...'
+ # Make some blank lines on console
+ echo -e '\n\n\n\n\n'
+}
# Define some handy variables
imagedir=/mnt/nfs/images
@@ -17,12 +22,14 @@ firstdisk_test || exit 2
# Run the main action script
if nfswrite_test
-then # Start deploy script
- source $scriptdir/image_deploy.sh
+then rest10 # Let user cancel it
+ source $scriptdir/image_deploy.sh # Start deploy script
else # Start capture script if all it needs is available
if scriptavailability_test image_capture_${hostname}.sh
- then source $scriptdir/image_capture.sh
+ then rest10 # Let user cancel it
+ source $scriptdir/image_capture.sh
+ # else No wait, nothing to do, go to eficast_end directly
fi
fi