summaryrefslogtreecommitdiff
path: root/packages/altboot/files/init.altboot
diff options
context:
space:
mode:
authorMatthias Hentges <oe@hentges.net>2006-01-21 12:27:25 +0000
committerOpenEmbedded Project <openembedded-devel@lists.openembedded.org>2006-01-21 12:27:25 +0000
commit8531d4f75210ce29d72d314b65035bfdecd882c2 (patch)
tree4e0a2f119faf1370888692b6670073aa171b9271 /packages/altboot/files/init.altboot
parent4ac1a07fcbd2a82ee7504a6423d42e6055a95d99 (diff)
altboot:
- 40-bootNFS: Copy resolv.conf from flash into pivot_root to allow working DNS - Allowing to use altboot as init inside a pivot_root. Which means as soon as th e new root is booted, you are presented with altboots menu again. But this ti me changing behaviour of the pivot_root booting sequence - Improved detected if altboot is run by user (to switch runlevels manually) or kernel. - Do not run scripts in /etc/altboot.rc if altboot is not enabled - Add Advanced/Boot original INIT. Note: "Normal Boot" might be different than the real /sbin/init on some machines.
Diffstat (limited to 'packages/altboot/files/init.altboot')
-rw-r--r--packages/altboot/files/init.altboot24
1 files changed, 10 insertions, 14 deletions
diff --git a/packages/altboot/files/init.altboot b/packages/altboot/files/init.altboot
index b1d0704501..81656fc9b2 100644
--- a/packages/altboot/files/init.altboot
+++ b/packages/altboot/files/init.altboot
@@ -8,7 +8,7 @@
test -e /etc/altboot.func && . /etc/altboot.func || die "ERROR: /etc/altboot.func not found. Check your installation!"
CURRENT_ENV="`set`"
-VERSION="0.0.2"
+VERSION="0.0.3"
# Set some defaults in case altboot.cfg is missing
REAL_INIT="/sbin/init.sysvinit"
@@ -141,7 +141,6 @@ show_sub_menu() {
run_timer() {
if test "$TIMEOUT" != 0
then
- test -x /opt/QtPalmtop/bin/zgreeter.sh && /opt/QtPalmtop/bin/zgreeter.sh
mount -t proc proc /proc >/dev/null 2>&1
key_ints="`cat /proc/interrupts | grep keyboard | awk '{print $2}'`"
@@ -257,15 +256,19 @@ wait_for_input() {
# * * * * * * This is the main function * * * * * *
-# if /sbin/init is launched with a parameter, it is very likely that the user is trying to switch runlevels
-# manually by running "/sbin/init $RUN_LEVEL". If it is empty (or just contains "tty1") we assume that the kernel
-# launched init during bootup
-if test -n "$*" -a "$*" != "tty1"
+if test "`runlevel`" != "unknown"
then
echo "altboot: Using real init [$REAL_INIT] [$*] *" >/dev/tty1
exec $REAL_INIT $*
exit 0
else
+ # Boot original init if altboot is turned off
+ if test "$ENABLE_ALTBOOT" != "yes"
+ then
+ echo "altboot: Using real init [$REAL_INIT] **" >/dev/tty1
+ 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
@@ -275,14 +278,7 @@ else
do
. /etc/altboot.rc/$file >/dev/tty1 2>&1 || echo "/etc/altboot.rc/$file failed!"
done
-
- if test "$ENABLE_ALTBOOT" != "yes"
- then
- echo "altboot: Using real init [$REAL_INIT] **" >/dev/tty1
- exec $REAL_INIT $INIT_RUNLEVEL
- exit 0
- fi
-
+
# Make sure altboots master password is set
set_password >/dev/tty0