diff options
author | Rene Wagner <rw@handhelds.org> | 2006-05-13 15:42:03 +0200 |
---|---|---|
committer | Rene Wagner <rw@handhelds.org> | 2006-05-13 15:42:03 +0200 |
commit | 5a5346dfbec459c10d9e61e16e125b83975a1ef1 (patch) | |
tree | 342e16f3fe790d03b93294344e6154459888939f /org.handhelds.familiar/packages/pivotinit |
OE tree imported from monotone branch org.openembedded.oz354fam083 at revision 8b12e35772d79306d1d9de19c12b23681618532d.
Diffstat (limited to 'org.handhelds.familiar/packages/pivotinit')
-rw-r--r-- | org.handhelds.familiar/packages/pivotinit/pivotinit_1.0.0.bb | 11 | ||||
-rw-r--r-- | org.handhelds.familiar/packages/pivotinit/spitz/init | 25 |
2 files changed, 36 insertions, 0 deletions
diff --git a/org.handhelds.familiar/packages/pivotinit/pivotinit_1.0.0.bb b/org.handhelds.familiar/packages/pivotinit/pivotinit_1.0.0.bb new file mode 100644 index 0000000..912cfeb --- /dev/null +++ b/org.handhelds.familiar/packages/pivotinit/pivotinit_1.0.0.bb @@ -0,0 +1,11 @@ +DESCRIPTION = "Dedicated /sbin/init for pivot root images" +SECTION = "base" +PRIORITY = "required" +LICENSE = "MIT" +PR = "r0" + +SRC_URI = "file://init" + +do_install () { + install -m 0755 -D ${WORKDIR}/init ${D}/sbin/init +} diff --git a/org.handhelds.familiar/packages/pivotinit/spitz/init b/org.handhelds.familiar/packages/pivotinit/spitz/init new file mode 100644 index 0000000..41e4aff --- /dev/null +++ b/org.handhelds.familiar/packages/pivotinit/spitz/init @@ -0,0 +1,25 @@ +#!/bin/sh + +mount -t proc proc /proc +mount -o remount,rw / +cardmgr -o +umount /proc +echo Mounting hda1. +mount -t ext3 /dev/hda1 /media/hdd + +# For some reason the Spitz tar doesn't create the devices. +if [ ! -b /media/hdd/dev/hda1 ]; then + echo Creating non existant device files. + /media/hdd/sbin/makedevs -D /media/hdd/etc/device_table -r /media/hdd/ +fi + +if [ -e /media/hdd/sbin/init -o -L /media/hdd/sbin/init ]; then + echo "Found /sbin/init on HD; pivoting." + cd /media/hdd + pivot_root . media/realroot + cd / + exec /sbin/init +fi + +echo Dropping to a shell due to problems. +exec /bin/sh |