diff options
author | Ludovic Pouzenc <ludovic.pouzenc@mines-albi.fr> | 2017-09-27 18:16:31 +0200 |
---|---|---|
committer | Ludovic Pouzenc <ludovic.pouzenc@mines-albi.fr> | 2017-09-27 18:16:31 +0200 |
commit | aa18bf14450688a94602523e7a934af267bc45a4 (patch) | |
tree | f913994bd4aa40de64b5043be16b9e5758c92f83 | |
parent | aba9f58b757b578d9e7176e6200a3c57aa0a7693 (diff) | |
download | eficast-aa18bf14450688a94602523e7a934af267bc45a4.tar.gz eficast-aa18bf14450688a94602523e7a934af267bc45a4.tar.bz2 eficast-aa18bf14450688a94602523e7a934af267bc45a4.zip |
autoruns : do checks before letting the user cancel the choosen action
-rwxr-xr-x | nfs/autorun.sh | 17 |
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 |