Add package to do some initialisation and fixups like unmounting stuff
authorFlorian Boor <florian.boor@kernelconcepts.de>
Mon, 4 Jul 2005 21:25:25 +0000 (21:25 +0000)
committerOpenEmbedded Project <openembedded-devel@lists.openembedded.org>
Mon, 4 Jul 2005 21:25:25 +0000 (21:25 +0000)
from initrd and create some useful links.

packages/maemo/nokia770-init/.mtn2git_empty [new file with mode: 0644]
packages/maemo/nokia770-init/fixup-770.sh [new file with mode: 0644]
packages/maemo/nokia770-init_1.0.bb [new file with mode: 0644]

diff --git a/packages/maemo/nokia770-init/.mtn2git_empty b/packages/maemo/nokia770-init/.mtn2git_empty
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/packages/maemo/nokia770-init/fixup-770.sh b/packages/maemo/nokia770-init/fixup-770.sh
new file mode 100644 (file)
index 0000000..02c18d4
--- /dev/null
@@ -0,0 +1,17 @@
+#! /bin/sh
+case "$1" in
+  start)
+        echo -n "Unmounting virtual fs from initrd"
+        umount /mnt/initfs/sys
+        umount /mnt/initfs/proc
+        ;;
+  stop)
+        ;;
+  *)
+        echo "Usage: $SCRIPTNAME {start|stop}" >&2
+        exit 1
+        ;;
+esac
+
+exit 0 
+                                                                   
\ No newline at end of file
diff --git a/packages/maemo/nokia770-init_1.0.bb b/packages/maemo/nokia770-init_1.0.bb
new file mode 100644 (file)
index 0000000..1cef924
--- /dev/null
@@ -0,0 +1,38 @@
+LICENSE    = "GPL"
+MAINTAINER = "Florian Boor <florian@kernelconcepts.de"
+PR         = "r1"
+
+DEPENDS    = "base-passwd hotplug-dbus"
+
+SRC_URI    = "file://fixup-770.sh"
+
+FILES_${PN} = "${sysconfdir} ${libdir}"
+
+inherit update-rc.d
+
+
+INITSCRIPT_NAME = "fixup-770.sh"
+INITSCRIPT_PARAMS = "defaults 01"
+
+
+do_install () {
+        install -d ${D}${sysconfdir}/init.d
+        install -m 755 ${S}/fixup-770.sh ${D}/${sysconfdir}/init.d/fixup-770.sh
+
+       install -d ${D}/lib/firmware
+}
+
+pkg_postinst () {
+#!/bin/sh
+
+# can't do adduser stuff offline
+if [ "x$D" != "x" ]; then
+  exit 1
+fi
+
+# set up some links to firmware and modules in initrd
+        ln -sf /mnt/initfs/lib/firmware/* /lib/firmware/
+
+       rm -rf /lib/modules
+       ln -s /mnt/initfs/lib/modules /lib/modules
+}