Skip to contentSkip to conversation

udev: fix init script for the location of udevd

PATCH In review Saul Wold 3 participants 4 messages Apr 9, 2013

lore
Share & tools
lore

Saul Wold

author
#0 lore raw

PATCH 1/1 udev: fix init script for the location of udevd

Ensure we can update the script base don the location of the udevd installation

---
 meta/recipes-core/udev/udev.inc        | 2 ++
 meta/recipes-core/udev/udev/init       | 4 ++--
 meta/recipes-core/udev/udev/udev-cache | 2 +-
 3 files changed, 5 insertions(+), 3 deletions(-)
meta/recipes-core/udev/udev.inc +2 -0
index c4d2ce4..d025458 100644
@@ -79,6 +79,8 @@ do_install_append () {
 	install -d ${D}${sysconfdir}/init.d
 	install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/udev
 	install -m 0755 ${WORKDIR}/udev-cache ${D}${sysconfdir}/init.d/udev-cache
+	sed -i s%@UDEVD@%${base_sbindir}/udev/udevd% ${D}${sysconfdir}/init.d/udev
+	sed -i s%@UDEVD@%${base_sbindir}/udev/udevd% ${D}${sysconfdir}/init.d/udev-cache
 
 	install -d ${D}${sysconfdir}/default
 	install -m 0755 ${WORKDIR}/udev-cache.default ${D}${sysconfdir}/default/udev-cache
meta/recipes-core/udev/udev/init +2 -2
index 95d2672..37b5231 100644
@@ -15,7 +15,7 @@ export TZ=/etc/localtime
 
 [ -d /sys/class ] || exit 1
 [ -r /proc/mounts ] || exit 1
-[ -x /lib/udev/udevd ] || exit 1
+[ -x @UDEVD@ ] || exit 1
 [ -f /etc/default/udev-cache ] && . /etc/default/udev-cache
 [ -f /etc/udev/udev.conf ] && . /etc/udev/udev.conf
 
@@ -71,7 +71,7 @@ case "$1" in
 
     # trigger the sorted events
     echo -e '\000\000\000\000' > /proc/sys/kernel/hotplug
-    /lib/udev/udevd -d
+    @UDEVD@ -d
 
     /usr/bin/udevadm control --env=STARTUP=1
     if [ "$not_first_boot" != "" ];then
meta/recipes-core/udev/udev/udev-cache +1 -1
index 0f3d7cd..01fec6e 100644
@@ -12,7 +12,7 @@
 export TZ=/etc/localtime
 
 [ -r /proc/mounts ] || exit 1
-[ -x /lib/udev/udevd ] || exit 1
+[ -x @UDEVD@ ] || exit 1
 [ -d /sys/class ] || exit 1
 
 [ -f /etc/default/udev-cache ] && . /etc/default/udev-cache
Signature · 1 line
1.8.0.2
#2 lore raw
Quoted 6 lines · Otavio Salvador
Quoted 3 lines · Saul Wold

Ensure we can update the script base don the location of the udevd installation

This does not work as we have systemd-udevd as possible binary.

But these changes are in the "udev" package, so will only be used on systems which are booting udev.

Related, all of the changes happening to udev need to happen to systemd aswell.

Ross

#3 lore raw
Quoted 4 lines · Ross
Quoted 3 lines · Otavio Salvador
Quoted 2 lines · Saul Wold

Ensure we can update the script base don the location of the udevd installation

Quoted 8 lines
Quoted 3 lines
Quoted 1 line

This does not work as we have systemd-udevd as possible binary.

But these changes are in the "udev" package, so will only be used on systems which are booting udev.

Related, all of the changes happening to udev need to happen to systemd aswell.

The init-live problem people are concerned about is not fixed for systemd-udevd as well.

--
Otavio Salvador O.S. Systems
E-mail: [email protected] http://www.ossystems.com.br
Mobile: +55 53 9981-7854 http://projetos.ossystems.com.br