]> pilppa.org Git - familiar-h63xx-build.git/blob - org.handhelds.familiar/packages/altboot/files/spitz/altboot-menu/10-noGui
OE tree imported from monotone branch org.openembedded.oz354fam083 at revision 8b12e3...
[familiar-h63xx-build.git] / org.handhelds.familiar / packages / altboot / files / spitz / altboot-menu / 10-noGui
1 # !/bin/sh
2 M_TITLE="Don't launch GUI"
3
4
5 die() {
6         echo "ERROR: $1" >/dev/tty0
7         exec $SH_SHELL </dev/tty0 >/dev/tty0 2>&1
8 }
9
10 run_module() {
11         
12         test -e /etc/altboot.func && . /etc/altboot.func || die "ERROR: /etc/altboot.func not found. Check your installation!"  
13         
14         test -z "$SPITZ_HDD_PART" && SPITZ_HDD_PART="/dev/hda1"
15         echo "Spitz: Mounting [$SPITZ_HDD_PART] as /media/hdd"
16         mount -t proc proc /proc || echo "Mounting /proc failed!"
17
18         mount -o remount,rw / 
19
20         # Note: Redirecting STDIN & STDOUT is required, cardmg will die otherwise
21         cardmgr -o < /dev/tty0 > /dev/tty0 2>&1 || echo "cardmgr -o failed!"
22         
23         # I've seen busybox die a horrible death on "!"...
24         if (mount -t auto $SPITZ_HDD_PART /media/hdd)
25         then
26                 a=a
27         else
28                 echo "ERROR: mount -t ext3 $SPITZ_HDD_PART /media/hdd failed!"
29                 exec $SH_SHELL </dev/tty0 >/dev/tty0 2>&1
30         fi
31
32         # There are no device files on Spitz yet, requires HDD (bad for testing
33         # with CF)
34         for n in 1 2 3 4 5
35         do
36                 ! test -e /dev/loop$n && mknod /dev/loop$n b 7 $n
37         done
38         
39         # Check for /sbin/init and / or loop-images     
40         check_target "/media/hdd" 2
41 }
42
43 case "$1" in
44 title)  echo "$M_TITLE";;
45 run)    run_module;;
46 esac
47