summaryrefslogtreecommitdiff
path: root/packages/altboot
diff options
context:
space:
mode:
Diffstat (limited to 'packages/altboot')
-rw-r--r--packages/altboot/altboot.bb2
-rw-r--r--packages/altboot/files/altboot-menu/Advanced/40-bootNFS5
-rw-r--r--packages/altboot/files/altboot-menu/Advanced/60-orig-init19
-rw-r--r--packages/altboot/files/altboot.func12
-rw-r--r--packages/altboot/files/init.altboot24
5 files changed, 41 insertions, 21 deletions
diff --git a/packages/altboot/altboot.bb b/packages/altboot/altboot.bb
index 5fe8d2278b..529814af1d 100644
--- a/packages/altboot/altboot.bb
+++ b/packages/altboot/altboot.bb
@@ -6,7 +6,7 @@ MAINTAINER = "Matthias 'CoreDump' Hentges <oe@hentges.net>"
LICENSE = "GPL"
-PR = "r10"
+PR = "r11"
SRC_URI = "file://altboot-menu \
diff --git a/packages/altboot/files/altboot-menu/Advanced/40-bootNFS b/packages/altboot/files/altboot-menu/Advanced/40-bootNFS
index cefc46c8d0..b5b93a5929 100644
--- a/packages/altboot/files/altboot-menu/Advanced/40-bootNFS
+++ b/packages/altboot/files/altboot-menu/Advanced/40-bootNFS
@@ -95,6 +95,7 @@ run_module() {
while test -z "$selection"
do
+ stty echo
echo -n "Boot NFS root: "
read junk < /dev/tty1
@@ -119,6 +120,10 @@ run_module() {
echo -n "Mounting NFS root..."
mount -t nfs "$selection" /media/nfsroot && echo ok || die "mount -t nfs "$selection" /media/nfsroot failed!"
+ # Use configured resolv.conf in the pivoted rootfs
+ echo -n "Copying resolv.conf..."
+ cp /etc/resolv.conf /media/nfsroot/etc >/dev/null 2>&1 && echo ok || echo "FAILED"
+
check_target "/media/nfsroot"
}
diff --git a/packages/altboot/files/altboot-menu/Advanced/60-orig-init b/packages/altboot/files/altboot-menu/Advanced/60-orig-init
new file mode 100644
index 0000000000..9f4ff78388
--- /dev/null
+++ b/packages/altboot/files/altboot-menu/Advanced/60-orig-init
@@ -0,0 +1,19 @@
+# !/bin/sh
+M_TITLE="Boot original INIT"
+
+
+run_module() {
+
+ test -e /etc/altboot.func && . /etc/altboot.func || die "ERROR: /etc/altboot.func not found. Check your installation!"
+
+ echo "altboot: Using real init [$REAL_INIT] [$INIT_RUNLEVEL] *" >/dev/tty1
+ exec $REAL_INIT $INIT_RUNLEVEL
+ exit 0
+
+}
+
+case "$1" in
+title) echo "$M_TITLE";;
+run) run_module;;
+esac
+
diff --git a/packages/altboot/files/altboot.func b/packages/altboot/files/altboot.func
index 7afb3727f9..91984a89ee 100644
--- a/packages/altboot/files/altboot.func
+++ b/packages/altboot/files/altboot.func
@@ -78,14 +78,14 @@ pivot_realfs() {
cd /
- # Boot init.sysvinit if it is available or use /sbin/init instead
- if test -x $REAL_INIT
+ # Boot /sbin/init if it is available or use /sbin/init.sysvinit instead
+ if test -x $/sbin/init
then
- echo "Calling INIT [$REAL_INIT $RL]"
- exec /usr/sbin/chroot . $REAL_INIT $RL >/dev/tty0 2>&1
- else
- echo "Calling INIT [/sbin/init $RL]"
+ echo "Calling INIT [/sbin/init $RL]"
exec /usr/sbin/chroot . /sbin/init $RL >/dev/tty0 2>&1
+ else
+ echo "Calling INIT [$REAL_INIT $RL]"
+ exec /usr/sbin/chroot . $REAL_INIT $RL >/dev/tty0 2>&1
fi
else
echo "FAILED"
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