summaryrefslogtreecommitdiff
path: root/packages/altboot/files/altboot.func
diff options
context:
space:
mode:
Diffstat (limited to 'packages/altboot/files/altboot.func')
-rw-r--r--packages/altboot/files/altboot.func30
1 files changed, 22 insertions, 8 deletions
diff --git a/packages/altboot/files/altboot.func b/packages/altboot/files/altboot.func
index 4389ff4ff8..612a0243b2 100644
--- a/packages/altboot/files/altboot.func
+++ b/packages/altboot/files/altboot.func
@@ -37,9 +37,9 @@ check_target() {
then
read junk < /dev/tty1
else
- if test -e /etc/.altboot-$2-real-or-loop.last
+ if test -e /etc/.altboot-real-or-loop.last
then
- junk="`cat /etc/.altboot-$2-real-or-loop.last`"
+ junk="`cat /etc/.altboot-real-or-loop.last`"
test -z "$junk" && read junk < /dev/tty1 || echo "$junk (autoboot)"
else
read junk < /dev/tty1
@@ -49,7 +49,7 @@ check_target() {
if test "$junk" = 1 -o "$junk" = 2
then
ans="$junk"
- echo "$junk" > /etc/.altboot-$2-real-or-loop.last
+ echo "$junk" > /etc/.altboot-real-or-loop.last
fi
done
@@ -73,6 +73,18 @@ check_target() {
fi
}
+boot_new_rootfs_splash() {
+C_RED="\033[37;44m"
+C_RESET="\033[0m"
+
+ echo -e "${C_RED}+----------------------------------------------------------+${C_RESET}"
+ echo -e "${C_RED}| |${C_RESET}"
+ echo -e "${C_RED}| Booting the selected rootfs... |${C_RESET}"
+ echo -e "${C_RED}| |${C_RESET}"
+ echo -e "${C_RED}+----------------------------------------------------------+${C_RESET}"
+
+}
+
# This function pivot_root's into a real filesystem calling $newrootfs/sbin/init
# $1 = The new rootfs
pivot_realfs() {
@@ -137,7 +149,9 @@ pivot_image() {
IMAGE_NAME="`ls *rootfs.bin`"
test -z "$IMAGE_NAME" && die "No rootfs found (*rootfs.bin) in $1/$IMAGE_PATH"
fi
-
+
+
+ echo ""
echo "Using [$IMAGE_NAME]"
mkdir -p /media/image || die "mkdir -p /media/image failed"
@@ -187,11 +201,11 @@ do_pivot(){
! test -d "$new_mpt" && mkdir -p "$new_mpt"
/bin/busybox mount -o move "$mpt" "$new_mpt"
done
-
+
+ clear
+ boot_new_rootfs_splash
echo "Calling INIT"
-
- #read junk
-
+
exec /usr/sbin/chroot . /sbin/init $2 >/dev/tty0 2>&1
else
echo "FAILED"