udev-rules: Pre usrmove systemd installs might not find udevd.
authorColin Guthrie <colin@mageia.org>
Thu, 16 Aug 2012 13:27:22 +0000 (14:27 +0100)
committerHarald Hoyer <harald@redhat.com>
Tue, 21 Aug 2012 16:46:20 +0000 (18:46 +0200)
If users had switched to systemd-183+ but have not completed
the usrmove, then the variable ${systemdutildir} will likely
refer to /usr/lib/systemd NOT /lib/systemd and thus the
systemd-udevd daemon may not be found.

So let's try a little harder and add another hard coded path
and if we don't find it, then bail out hard.

modules.d/95udev-rules/module-setup.sh

index 2e3c955..5e1cce5 100755 (executable)
@@ -12,7 +12,7 @@ install() {
         /etc/udev/udev.conf /etc/group
 
     [ -d ${initdir}/lib/systemd ] || mkdir -p ${initdir}/lib/systemd
-    for _i in ${systemdutildir}/systemd-udevd ${udevdir}/udevd /sbin/udevd; do
+    for _i in ${systemdutildir}/systemd-udevd ${udevdir}/udevd /lib/systemd/systemd-udevd /sbin/udevd; do
         [ -x "$_i" ] || continue
         inst "$_i"
 
@@ -21,6 +21,10 @@ install() {
         fi
         break
     done
+    if ! [[ -e ${initdir}/lib/systemd/systemd-udevd ]]; then
+        derror "Cannot find [systemd-]udevd binary!"
+        exit 1
+    fi
 
     inst_rules 50-udev-default.rules 60-persistent-storage.rules \
         61-persistent-storage-edd.rules 80-drivers.rules 95-udev-late.rules \