diff options
| author | Michael Lauer <mickey@vanille-media.de> | 2006-04-23 16:29:33 +0000 |
|---|---|---|
| committer | OpenEmbedded Project <openembedded-devel@lists.openembedded.org> | 2006-04-23 16:29:33 +0000 |
| commit | e99fa15bdf99ddef110d2ed419e3f67fd47c94de (patch) | |
| tree | 2a3690502be250dfe49147ed1cd020e7b7b24b06 /packages/altboot/files/init.altboot | |
| parent | 4aeb84024a17e85836869b257b682fabedee1917 (diff) | |
| parent | 43a499b782367210547e21c1f3e8aabdbcd2d29c (diff) | |
merge of d23a51fd3de55ab7bd14228f1701651fb28530e6
and e399d3faf8861b253531bf4ec2dbec4e5ea1af2b
Diffstat (limited to 'packages/altboot/files/init.altboot')
| -rw-r--r-- | packages/altboot/files/init.altboot | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/packages/altboot/files/init.altboot b/packages/altboot/files/init.altboot index a987918760..3dc7c60240 100644 --- a/packages/altboot/files/init.altboot +++ b/packages/altboot/files/init.altboot @@ -27,16 +27,31 @@ esac test -e "$ALTBOOT_CFG_FILE" && . "$ALTBOOT_CFG_FILE" || echo "WARNING: No $ALTBOOT_CFG_FILE found! Check your installation of Altboot!" > /dev/tty1 C_RED="\033[31m" +C_YELLOW="\033[33m" C_BLUE="\033[34m" C_WHITE="\033[37m" C_RESET="\033[0m" die() { - echo -e "ERROR: $1" >/dev/tty0 + echo -e "${C_RED}ERROR: $1${C_RESET}" >/dev/tty0 exec $SH_SHELL </dev/tty0 >/dev/tty0 2>&1 } +debug_shell() { + # VT 2 = Opie, VT 3 = GPE + test -z "$1" && VT=4 || VT=$1 + + echo -e "\033c" > /dev/tty$VT + + echo -en "\nPress <ENTER> to activate the debug shell." > /dev/tty$VT + read junk </dev/tty$VT + + echo "" > /dev/tty$VT + /bin/sh </dev/tty$VT >/dev/tty$VT 2>&1 + + #openvt -lf -c$VT -- /bin/sh </dev/tty$VT >/dev/tty$VT 2>&1 +} # This function prints the boot-menu # $1: Directory containing the scripts for the menu-items @@ -299,6 +314,13 @@ wait_for_input() { # Note: this is positively ugly. If someone knows a better way to detect wheter # we are already booted into a runlevel _without_ reading /var and / or using `runlevel` # PLEASE let me know. + +if ( echo "$VERSION" | egrep -iq "(snapshot|-rc)" ) +then + ENABLE_DEBUG="yes" + debug_shell 4 >/dev/null 2>&1 & +fi + if test -f /proc/cmdline -a "`ps ax|wc -l|tr -d " "`" -gt 30 -a "$1" != "-force" then echo "altboot: Using real init [$REAL_INIT] [$*] [`ps ax|wc -l|tr -d " "`] *" >/dev/tty1 |
