diff options
Diffstat (limited to 'meta/recipes-core/udev')
-rw-r--r-- | meta/recipes-core/udev/eudev/init | 37 | ||||
-rw-r--r-- | meta/recipes-core/udev/eudev_3.2.11.bb | 2 |
2 files changed, 39 insertions, 0 deletions
diff --git a/meta/recipes-core/udev/eudev/init b/meta/recipes-core/udev/eudev/init index c60dbbf6d5..477a525b21 100644 --- a/meta/recipes-core/udev/eudev/init +++ b/meta/recipes-core/udev/eudev/init | |||
@@ -23,6 +23,42 @@ kill_udevd () { | |||
23 | [ -n "$pid" ] && kill $pid | 23 | [ -n "$pid" ] && kill $pid |
24 | } | 24 | } |
25 | 25 | ||
26 | make_static_nodes () { | ||
27 | [ -e /lib/modules/$(uname -r)/modules.devname ] || return 0 | ||
28 | [ -x @KMOD@ ] || return 0 | ||
29 | |||
30 | #output to /proc/self/fd/1 since /dev/stdout not created by udevd yet | ||
31 | @KMOD@ static-nodes --format=tmpfiles --output=/proc/self/fd/1 | | ||
32 | while read TTYPE TPATH TMODE TUSER TGROUP TAGE TARG; do | ||
33 | case "${TTYPE}" in | ||
34 | 'd') | ||
35 | test -d "${TPATH}" || mkdir -p -m "${TMODE}" "${TPATH}" | ||
36 | ;; | ||
37 | |||
38 | 'c!') | ||
39 | if [ ! -c "${TPATH}" ]; then | ||
40 | old_ifs="${IFS}" | ||
41 | IFS=: | ||
42 | set -- ${TARG} | ||
43 | IFS="${old_ifs}" | ||
44 | mknod -m "${TMODE}" "${TPATH}" c "$@" | ||
45 | fi | ||
46 | ;; | ||
47 | |||
48 | *) | ||
49 | echo "Unparseable line (${TTYPE} ${TPATH} ${TMODE} ${TUSER} ${TGROUP} ${TAGE} ${TARG})" | ||
50 | return 1 | ||
51 | ;; | ||
52 | esac | ||
53 | if [ "${TUSER}" != "-" ]; then | ||
54 | chown "${TUSER}" "${TPATH}" | ||
55 | fi | ||
56 | if [ "${TGROUP}" != "-" ]; then | ||
57 | chgrp "${TGROUP}" "${TPATH}" | ||
58 | fi | ||
59 | done | ||
60 | } | ||
61 | |||
26 | case "$1" in | 62 | case "$1" in |
27 | start) | 63 | start) |
28 | export ACTION=add | 64 | export ACTION=add |
@@ -51,6 +87,7 @@ case "$1" in | |||
51 | # make_extra_nodes | 87 | # make_extra_nodes |
52 | kill_udevd > "/dev/null" 2>&1 | 88 | kill_udevd > "/dev/null" 2>&1 |
53 | 89 | ||
90 | make_static_nodes | ||
54 | # trigger the sorted events | 91 | # trigger the sorted events |
55 | [ -e /proc/sys/kernel/hotplug ] && printf '\0\n' >/proc/sys/kernel/hotplug | 92 | [ -e /proc/sys/kernel/hotplug ] && printf '\0\n' >/proc/sys/kernel/hotplug |
56 | @UDEVD@ -d | 93 | @UDEVD@ -d |
diff --git a/meta/recipes-core/udev/eudev_3.2.11.bb b/meta/recipes-core/udev/eudev_3.2.11.bb index 841039f6d7..a0a19e501d 100644 --- a/meta/recipes-core/udev/eudev_3.2.11.bb +++ b/meta/recipes-core/udev/eudev_3.2.11.bb | |||
@@ -41,6 +41,7 @@ do_install:append() { | |||
41 | install -d ${D}${sysconfdir}/init.d | 41 | install -d ${D}${sysconfdir}/init.d |
42 | install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/udev | 42 | install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/udev |
43 | sed -i s%@UDEVD@%${base_sbindir}/udevd% ${D}${sysconfdir}/init.d/udev | 43 | sed -i s%@UDEVD@%${base_sbindir}/udevd% ${D}${sysconfdir}/init.d/udev |
44 | sed -i s%@KMOD@%${base_bindir}/kmod% ${D}${sysconfdir}/init.d/udev | ||
44 | 45 | ||
45 | install -d ${D}${sysconfdir}/udev/rules.d | 46 | install -d ${D}${sysconfdir}/udev/rules.d |
46 | install -m 0644 ${WORKDIR}/local.rules ${D}${sysconfdir}/udev/rules.d/local.rules | 47 | install -m 0644 ${WORKDIR}/local.rules ${D}${sysconfdir}/udev/rules.d/local.rules |
@@ -73,6 +74,7 @@ FILES:libudev = "${base_libdir}/libudev.so.*" | |||
73 | FILES:eudev-hwdb = "${sysconfdir}/udev/hwdb.d" | 74 | FILES:eudev-hwdb = "${sysconfdir}/udev/hwdb.d" |
74 | 75 | ||
75 | RDEPENDS:eudev-hwdb += "eudev" | 76 | RDEPENDS:eudev-hwdb += "eudev" |
77 | RDEPENDS:eudev += "kmod" | ||
76 | 78 | ||
77 | RPROVIDES:${PN} = "hotplug udev" | 79 | RPROVIDES:${PN} = "hotplug udev" |
78 | RPROVIDES:eudev-hwdb += "udev-hwdb" | 80 | RPROVIDES:eudev-hwdb += "udev-hwdb" |