summaryrefslogtreecommitdiff
path: root/packages/altboot/files/spitz/altboot-menu/00-Default
diff options
context:
space:
mode:
Diffstat (limited to 'packages/altboot/files/spitz/altboot-menu/00-Default')
-rw-r--r--packages/altboot/files/spitz/altboot-menu/00-Default49
1 files changed, 49 insertions, 0 deletions
diff --git a/packages/altboot/files/spitz/altboot-menu/00-Default b/packages/altboot/files/spitz/altboot-menu/00-Default
new file mode 100644
index 0000000000..c18633a136
--- /dev/null
+++ b/packages/altboot/files/spitz/altboot-menu/00-Default
@@ -0,0 +1,49 @@
+# !/bin/sh
+M_TITLE="Normal Boot"
+
+# Note for Spitz: The HDD has already been mounted in /media/hdd from
+# /etc/altboot.rc/00-Default.sh
+
+die() {
+ echo "ERROR: $1" >/dev/tty0
+ exec $SH_SHELL </dev/tty0 >/dev/tty0 2>&1
+}
+
+run_module() {
+
+ test -e /etc/altboot.func && . /etc/altboot.func || die "ERROR: /etc/altboot.func not found. Check your installation!"
+
+ test -z "$SPITZ_HDD_PART" && SPITZ_HDD_PART="/dev/hda1"
+ echo "Spitz: Mounting [$SPITZ_HDD_PART] as /media/hdd"
+ mount -t proc proc /proc || echo "Mounting /proc failed!"
+
+ mount -o remount,rw /
+
+ # Note: Redirecting STDIN & STDOUT is required, cardmg will die otherwise
+ cardmgr -o < /dev/tty0 > /dev/tty0 2>&1 || echo "cardmgr -o failed!"
+
+ # I've seen busybox die a horrible death on "!"...
+ if (mount -t auto $SPITZ_HDD_PART /media/hdd)
+ then
+ a=a
+ else
+ echo "ERROR: mount -t ext3 $SPITZ_HDD_PART /media/hdd failed!"
+ exec $SH_SHELL </dev/tty0 >/dev/tty0 2>&1
+ fi
+
+ # There are no device files on Spitz yet, requires HDD (bad for testing
+ # with CF)
+ for n in 1 2 3 4 5
+ do
+ mknod /dev/loop$n b 7 $n
+ done
+
+ # Check for /sbin/init and / or loop-images
+ check_target "/media/hdd" 5
+}
+
+case "$1" in
+title) echo "$M_TITLE";;
+run) run_module;;
+esac
+