diff options
author | Matthias Hentges <oe@hentges.net> | 2006-05-07 11:37:01 +0000 |
---|---|---|
committer | OpenEmbedded Project <openembedded-devel@lists.openembedded.org> | 2006-05-07 11:37:01 +0000 |
commit | 8ededc2864b7161748351a952acadeadc048c974 (patch) | |
tree | 83b2cc4fe1faaf8d1df3979510520feaa0f8f997 /packages | |
parent | 7279ce119e29550ab95c9b6b64e094c4bfae92a6 (diff) |
altboot: Fix redirection so altboot can now be launched remotely and remove dependency from altboot-conf
Diffstat (limited to 'packages')
-rw-r--r-- | packages/altboot/altboot_0.0.0.bb | 1 | ||||
-rw-r--r-- | packages/altboot/files/altboot.func | 21 | ||||
-rw-r--r-- | packages/altboot/files/init.altboot | 16 |
3 files changed, 19 insertions, 19 deletions
diff --git a/packages/altboot/altboot_0.0.0.bb b/packages/altboot/altboot_0.0.0.bb index 91798718db..2935dedc30 100644 --- a/packages/altboot/altboot_0.0.0.bb +++ b/packages/altboot/altboot_0.0.0.bb @@ -18,7 +18,6 @@ RRECOMMENDS_${PN}_append_spitz = " kexec-tools" RRECOMMENDS_${PN}_append_c7x0 = " kexec-tools" RDEPENDS_${PN} = "${PN}-conf" -RDEPENDS_${PN}-conf = "${PN}" ###################################################################################### diff --git a/packages/altboot/files/altboot.func b/packages/altboot/files/altboot.func index 73e82e31ce..98c38b40ef 100644 --- a/packages/altboot/files/altboot.func +++ b/packages/altboot/files/altboot.func @@ -43,14 +43,14 @@ check_target() { if test "$AUTOBOOT" != "yes" then - read junk < /dev/tty1 + read junk < "$OUT_TTY" else if test -e /etc/.altboot-real-or-loop.last then junk="`cat /etc/.altboot-real-or-loop.last`" - test -z "$junk" && read junk < /dev/tty1 || echo "$junk (autoboot)" + test -z "$junk" && read junk < "$OUT_TTY" || echo "$junk (autoboot)" else - read junk < /dev/tty1 + read junk < "$OUT_TTY" fi fi @@ -133,14 +133,14 @@ pivot_image() { echo -en "Please choose one of the above: " if test "$AUTOBOOT" != "yes" then - read junk < /dev/tty1 + read junk < "$OUT_TTY" else if test -e /etc/.altboot-loopimage.last then junk="`cat /etc/.altboot-loopimage.last`" - test -z "$junk" && read junk < /dev/tty1 || echo "$junk (autoboot)" + test -z "$junk" && read junk < "$OUT_TTY" || echo "$junk (autoboot)" else - read junk < /dev/tty1 + read junk < "$OUT_TTY" fi fi @@ -331,7 +331,7 @@ image_conf(){ # This functions configures the master password for altboot if none is set set_password() { mount -o remount,rw / - if test -z "$MASTER_PASSWORD" + if test -z "$MASTER_PASSWORD" -a "$ENABLE_DEBUG" != yes then echo -e "\nAltboot is a boot-manager which allows to boot from SD,\nCF, USB-Storage and NFS" echo -e "\nFor security reasons altboot requires a password\nto boot into init=/bin/sh." @@ -612,8 +612,9 @@ get_pref() { data_out="$3" data_list="`eval echo -e \\$${data_name}`" - data_value="`echo "$data_list"| sed "s/\#\#\#/\\n/g"|sed s/^\ // | grep "^$data_id##" | sed -n "s/.*\#\(.*\)$/\1/p"`" - + #data_value="`echo "$data_list"| sed "s/\#\#\#/\\n/g"|sed s/^\ // | grep "^$data_id##" | sed -n "s/.*\#\(.*\)$/\1/p"`" + #data_value="`echo "$data_list"| sed "s/\#\#\#/\\n/g"|sed s/^\ // | sed -n "/^$data_id/s/.*\#\(.*\)$/\1/p"`" + data_value="`echo "$data_list"| sed "s/\#\#\#/\\n/g" | sed -n "s/^\ //;/^$data_id\#/s/.*\#\(.*\)$/\1/p"`" # echo "WERT: [$data_value]" export "${data_out}"="$data_value" @@ -748,7 +749,7 @@ start_networking() { echo "Restarting udhcpc for [$WLAN_NIC]" killall udhcpc - udhcpc -i "$WLAN_NIC" -H `cat /etc/hostname` >/dev/tty1 2>&1 + udhcpc -i "$WLAN_NIC" -H `cat /etc/hostname` >"$OUT_TTY" 2>&1 fi if test "$NW_TYPE" = "USB" diff --git a/packages/altboot/files/init.altboot b/packages/altboot/files/init.altboot index 7539a292f4..08ba81e962 100644 --- a/packages/altboot/files/init.altboot +++ b/packages/altboot/files/init.altboot @@ -17,7 +17,7 @@ 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 -OUT_TTY="/dev/tty1" +OUT_TTY="`tty`" ; test -z "$OUT_TTY" && OUT_TTY="/dev/tty1" case "`uname -r`" in 2.6*) ALTBOOT_CFG_FILE="/etc/altboot-2.6.cfg";; @@ -26,7 +26,7 @@ case "`uname -r`" in ALTBOOT_CFG_FILE="/etc/altboot-2.6.cfg";; esac -test -e "$ALTBOOT_CFG_FILE" && . "$ALTBOOT_CFG_FILE" || echo "WARNING: No $ALTBOOT_CFG_FILE found! Check your installation of Altboot!" > /dev/tty1 +test -e "$ALTBOOT_CFG_FILE" && . "$ALTBOOT_CFG_FILE" || echo "WARNING: No $ALTBOOT_CFG_FILE found! Check your installation of Altboot!" > "$OUT_TTY" C_RED="\033[31m" C_YELLOW="\033[33m" @@ -181,7 +181,7 @@ run_timer() { esac stty -echo <"$OUT_TTY" >"$OUT_TTY" 2>&1 - echo -en "\n\nPlease press any key to launch altboot." > /dev/tty1 + echo -en "\n\nPlease press any key to launch altboot." > "$OUT_TTY" test -z "$TIMEOUT" && TIMEOUT="3" @@ -201,7 +201,7 @@ run_timer() { stty echo <"$OUT_TTY" >"$OUT_TTY" 2>&1 break fi - echo -n "." >/dev/tty1 + echo -n "." >"$OUT_TTY" let cnt=$cnt+1 done @@ -325,7 +325,7 @@ 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 + echo "altboot: Using real init [$REAL_INIT] [$*] [`ps ax|wc -l|tr -d " "`] *" >"$OUT_TTY" exec $REAL_INIT $* # exec $SH_SHELL </dev/tty0 >/dev/tty0 2>&1 exit 0 @@ -333,7 +333,7 @@ else # Boot original init if altboot is turned off if test "$ENABLE_ALTBOOT" != "yes" then - echo "altboot: Using real init [$REAL_INIT] **" >/dev/tty1 + echo "altboot: Using real init [$REAL_INIT] **" >"$OUT_TTY" exec $REAL_INIT $INIT_RUNLEVEL exit 0 fi @@ -344,7 +344,7 @@ else for file in $RC_FILES do - . /etc/altboot.rc/$file >/dev/tty1 2>&1 || echo "/etc/altboot.rc/$file failed!" + . /etc/altboot.rc/$file >"$OUT_TTY" 2>&1 || echo "/etc/altboot.rc/$file failed!" done # Make sure altboots master password is set @@ -357,7 +357,7 @@ else # This timeout works by reading /proc/interrupts to see if the keyboard interrupt # increases while the timer is running. A TIMEOUT of 0 will always launch altboot. - run_timer >/dev/tty1 + run_timer >"$OUT_TTY" echo "" >"$OUT_TTY" |