From 0a827560667bcf151c3f0a4d23ed62e283230fee Mon Sep 17 00:00:00 2001 From: Ludovic Pouzenc Date: Wed, 27 Sep 2017 18:07:34 +0200 Subject: Remove "silent" (harder to debug things for end-user) --- make-boot-image.sh | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/make-boot-image.sh b/make-boot-image.sh index 465ef57..9eaf529 100755 --- a/make-boot-image.sh +++ b/make-boot-image.sh @@ -327,22 +327,18 @@ echo_color() { } # if no args, print colored message, wait 1 minute and reboot -# if first arg is 'silent', just reboot eficast_end() { - if [ "$1" -ne 'silent'] - then echo_color white green "----- EFICAST end of execution ------" - sleep 60 - fi - sync - umount /dev /sys /proc - #umount /dev/pts /dev /sys /proc - reboot -f + echo_color white green "----- EFICAST end of execution ------" + read -t10 -p 'Ctrl+C to have a shell, Enter to skip wait time...' + reboot } +# note : rcS rescue_shell is slighly different because 'sh' and 'reboot' need cautions to work rescue_shell() { + echo echo_color white red "Something went wrong. Dropping to a shell." PS1='\h:\w# ' /bin/busybox sh - eficast_end silent + eficast_end } machine_info() { @@ -404,6 +400,7 @@ cat > "$WORKDIR/initrd/etc/init.d/rcS" <<"EOF" echo -e '\033[37;43m'----- rcS script started -----'\033[0m' # Hint for user about boot steps if its hangs # Declare some funcs to have a tidy output with trace mode +# note : init.d/funcs rescue_shell is slighly different the environnement is ready to go rescue_shell() { echo_color white red "Something went wrong. Dropping to a shell." PS1='\h:\w# ' setsid cttyhack /bin/busybox sh -- cgit v1.2.3