appliance: Find udevd a bit faster.

Rearrange the paths that we check for udevd so that the systemd paths
are first.  Break from the loop as soon as we find udevd.
This commit is contained in:
Richard W.M. Jones
2016-05-17 13:20:14 +01:00
parent db1f811b29
commit 8a4dcde16a

View File

@@ -89,13 +89,13 @@ echo "${machine_id// /}" > /etc/machine-id
systemd-tmpfiles --prefix=/dev --create --boot
# Find udevd and run it directly.
for f in /sbin/udevd /lib/udev/udevd \
/lib/systemd/systemd-udevd /usr/lib/systemd/systemd-udevd \
for f in /lib/systemd/systemd-udevd /usr/lib/systemd/systemd-udevd \
/sbin/udevd /lib/udev/udevd \
/usr/lib/udev/udevd; do
if [ -x "$f" ]; then UDEVD="$f"; fi
if [ -x "$f" ]; then UDEVD="$f"; break; fi
done
if [ -z "$UDEVD" ]; then
echo "udev not found! Things will probably not work ..."
echo "error: udev not found! Things will probably not work ..."
fi
$UDEVD --daemon #--debug