]> pilppa.org Git - familiar-h63xx-build.git/blob - org.handhelds.familiar/packages/pivotinit/spitz/init
OE tree imported from monotone branch org.openembedded.oz354fam083 at revision 8b12e3...
[familiar-h63xx-build.git] / org.handhelds.familiar / packages / pivotinit / spitz / init
1 #!/bin/sh
2
3 mount -t proc proc /proc
4 mount -o remount,rw /
5 cardmgr -o
6 umount /proc
7 echo Mounting hda1.
8 mount -t ext3 /dev/hda1 /media/hdd
9
10 # For some reason the Spitz tar doesn't create the devices.
11 if [ ! -b /media/hdd/dev/hda1 ]; then
12         echo Creating non existant device files.
13         /media/hdd/sbin/makedevs -D /media/hdd/etc/device_table -r /media/hdd/
14 fi
15
16 if [ -e /media/hdd/sbin/init -o -L /media/hdd/sbin/init ]; then
17         echo "Found /sbin/init on HD; pivoting."
18         cd /media/hdd
19         pivot_root . media/realroot
20         cd /
21         exec /sbin/init
22 fi
23
24 echo Dropping to a shell due to problems.
25 exec /bin/sh