Patchwork [5/5] initramfs-module-udev: add

login
register
mail settings
Submitter Otavio Salvador
Date Dec. 6, 2011, 4:07 p.m.
Message ID <eeec6f5e18bc04d5463be1e18331e08923f6afc1.1323187516.git.otavio@ossystems.com.br>
Download mbox | patch
Permalink /patch/16317/
State New
Headers show

Comments

Otavio Salvador - Dec. 6, 2011, 4:07 p.m.
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
---
 .../initrdscripts/initramfs-module-udev/udev       |   22 ++++++++++++++++++++
 .../initrdscripts/initramfs-module-udev_1.0.bb     |   16 ++++++++++++++
 2 files changed, 38 insertions(+), 0 deletions(-)
 create mode 100644 meta/recipes-core/initrdscripts/initramfs-module-udev/udev
 create mode 100644 meta/recipes-core/initrdscripts/initramfs-module-udev_1.0.bb

Patch

diff --git a/meta/recipes-core/initrdscripts/initramfs-module-udev/udev b/meta/recipes-core/initrdscripts/initramfs-module-udev/udev
new file mode 100644
index 0000000..9ea8aa3
--- /dev/null
+++ b/meta/recipes-core/initrdscripts/initramfs-module-udev/udev
@@ -0,0 +1,22 @@ 
+#!/bin/sh
+# Copyright (C) 2011 O.S. Systems Software LTDA.
+# Licensed on MIT
+
+udev_enabled() {
+	if [ ! -e /sbin/udevd ]; then
+		debug "/sbin/udev doesn't exist"
+		return 1
+	fi
+
+	return 0
+}
+
+udev_run() {
+	mkdir -p /run
+
+	udevd --daemon > /dev/null
+	udevadm trigger --action=add
+	udevadm settle
+
+	killall udevd 2>/dev/null
+}
diff --git a/meta/recipes-core/initrdscripts/initramfs-module-udev_1.0.bb b/meta/recipes-core/initrdscripts/initramfs-module-udev_1.0.bb
new file mode 100644
index 0000000..a3fcba0
--- /dev/null
+++ b/meta/recipes-core/initrdscripts/initramfs-module-udev_1.0.bb
@@ -0,0 +1,16 @@ 
+DESCRIPTION = "initramfs support for udev"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
+RDEPENDS = "initramfs-base udev udev-utils"
+RCONFLICTS = "initramfs-module-mdev"
+
+inherit allarch
+
+SRC_URI = "file://udev"
+
+do_install() {
+    install -d ${D}/init.d
+    install -m 0755 ${WORKDIR}/udev ${D}/init.d/01-udev
+}
+
+FILES_${PN} = "/init.d/*"