Blob Blame History Raw
From aac825766ceab91e5d234fba83d03dc25b1de882 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Tue, 17 May 2016 13:20:14 +0100
Subject: [PATCH] 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.

(cherry picked from commit 8a4dcde16accef1a2e1a1bc5a71146295ed6a214)
---
 appliance/init | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/appliance/init b/appliance/init
index d168b5e..1f38a0e 100755
--- a/appliance/init
+++ b/appliance/init
@@ -91,13 +91,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
-- 
2.7.4