diff options
| author | Oyvind Repvik <nail@nslu2-linux.org> | 2006-10-29 13:26:37 +0000 |
|---|---|---|
| committer | Oyvind Repvik <nail@nslu2-linux.org> | 2006-10-29 13:26:37 +0000 |
| commit | 7eefe1a09db7dab17fe4db1adc6f2cc27bf8175f (patch) | |
| tree | 5458bb0d75cf561f9db6a1529c4477f384a570ff /packages/altboot/files/init.altboot | |
| parent | e20a5cfffb792ac300ad732e634418a3baf993fa (diff) | |
| parent | e8dc30e04b608c1c4c497ed12c0c56c009692d44 (diff) | |
merge of '48a764df77d365129ff1353e6c89bd2787a10485'
and 'ee13a485ec097c5eb2f6e8a232ad7edc49b5ad75'
Diffstat (limited to 'packages/altboot/files/init.altboot')
| -rw-r--r-- | packages/altboot/files/init.altboot | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/packages/altboot/files/init.altboot b/packages/altboot/files/init.altboot index dc3ff07ad8..b872af2d20 100644 --- a/packages/altboot/files/init.altboot +++ b/packages/altboot/files/init.altboot @@ -6,7 +6,7 @@ # test -e /etc/altboot.func && . /etc/altboot.func || die "ERROR: /etc/altboot.func not found. Check your installation!" - + CURRENT_ENV="`set`" VERSION="DEVELOPER SNAPSHOT" @@ -17,8 +17,21 @@ REAL_INIT="/sbin/init.sysvinit" INIT_RUNLEVEL="`cat /etc/inittab | sed -n "/^id\:/s/id\:\([0-9]\)\:.*$/\1/p"`" test -z "$INIT_RUNLEVEL" && INIT_RUNLEVEL=5 +# If this step fails the results are fatal. Seen on Collie / kernel 2.4 (where else...) OUT_TTY="`tty`" ; test -z "$OUT_TTY" && OUT_TTY="/dev/tty1" +if test -z "$OUT_TTY" +then + OUT_TTY="/dev/tty1" + echo "WARNING: Assgnment of OUT_TTY failed!" > "$OUT_TTY" +fi + +if ( echo "$OUT_TTY" | grep -q "not" ) +then + OUT_TTY="/dev/tty1" + echo "WARNING: Assignment of OUT_TTY failed (2)!" > "$OUT_TTY" +fi + case "`uname -r`" in 2.6*) ALTBOOT_CFG_FILE="/etc/altboot-2.6.cfg";; 2.4*) ALTBOOT_CFG_FILE="/etc/altboot-2.4.cfg";; @@ -34,6 +47,8 @@ then rm "${ALTBOOT_CFG_FILE}.next-reboot" fi +test "$ENABLE_DEBUGGING" = "yes" && ENABLE_DEBUG="yes" + C_RED="\033[31m" C_YELLOW="\033[33m" C_BLUE="\033[34m" @@ -167,9 +182,7 @@ show_sub_menu() { #echo "[$d_entries]" echo -e "\naltboot v$VERSION: $dirname menu\n" - - #debug_echo "show_sub_menu(): ping" - + for d_entry in $d_entries do d_entry_number="`echo "$d_entry"| sed -n "s/\(.*\)\#\#\(.*\)\#\#\#/\1/p"`" @@ -416,7 +429,7 @@ else exec $REAL_INIT $INIT_RUNLEVEL exit 0 fi - + # Execute scripts in /etc/altboot.rc before doing anything else. # Required in special situations, like booting spitz RC_FILES=`ls /etc/altboot.rc | grep \.sh$` |
