Blob Blame History Raw
From 80dab03a7dc080b8d35fdd4c23e30e79e044c2a2 Mon Sep 17 00:00:00 2001
From: Dimitri John Ledkov <dimitri.j.ledkov@intel.com>
Date: Tue, 17 Feb 2015 13:03:01 +0000
Subject: [PATCH] Fix default udev & systemd dir detection, in usr-merge
 configurations.

Test that /lib is not a symlink, before using split-usr paths.
---
 dracut.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/dracut.sh b/dracut.sh
index d06d7d4..4f72b54 100755
--- a/dracut.sh
+++ b/dracut.sh
@@ -1300,7 +1300,7 @@ done
 [[ -d $udevdir ]] \
     || udevdir="$(pkg-config udev --variable=udevdir 2>/dev/null)"
 if ! [[ -d "$udevdir" ]]; then
-    [[ -d /lib/udev ]] && udevdir=/lib/udev
+    [[ ! -h /lib ]] && [[ -d /lib/udev ]] && udevdir=/lib/udev
     [[ -d /usr/lib/udev ]] && udevdir=/usr/lib/udev
 fi
 
@@ -1308,7 +1308,7 @@ fi
     || systemdutildir=$(pkg-config systemd --variable=systemdutildir 2>/dev/null)
 
 if ! [[ -d "$systemdutildir" ]]; then
-    [[ -d /lib/systemd ]] && systemdutildir=/lib/systemd
+    [[ ! -h /lib ]] && [[ -d /lib/systemd ]] && systemdutildir=/lib/systemd
     [[ -d /usr/lib/systemd ]] && systemdutildir=/usr/lib/systemd
 fi