summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLudovic Pouzenc <ludovic.pouzenc@mines-albi.fr>2017-09-27 18:07:34 +0200
committerLudovic Pouzenc <ludovic.pouzenc@mines-albi.fr>2017-09-27 18:07:34 +0200
commit0a827560667bcf151c3f0a4d23ed62e283230fee (patch)
treec1d68585f89f760167b7fe839106926a2da169b3
parent302c534621e60d664753a6d5690528c5744904ba (diff)
downloadeficast-0a827560667bcf151c3f0a4d23ed62e283230fee.tar.gz
eficast-0a827560667bcf151c3f0a4d23ed62e283230fee.tar.bz2
eficast-0a827560667bcf151c3f0a4d23ed62e283230fee.zip
Remove "silent" (harder to debug things for end-user)
-rwxr-xr-xmake-boot-image.sh17
1 files 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