while test -z "$selection"
do
+ stty echo
echo -n "Boot NFS root: "
read junk < /dev/tty1
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"
}
--- /dev/null
+# !/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
+
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"
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"
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}'`"
# * * * * * * 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
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