summaryrefslogtreecommitdiff
path: root/make-boot-image.sh
diff options
context:
space:
mode:
Diffstat (limited to 'make-boot-image.sh')
-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