diff options
Diffstat (limited to 'sys-kernel/dracut/files/045-systemdutildir.patch')
-rw-r--r-- | sys-kernel/dracut/files/045-systemdutildir.patch | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/sys-kernel/dracut/files/045-systemdutildir.patch b/sys-kernel/dracut/files/045-systemdutildir.patch new file mode 100644 index 0000000..e56abba --- /dev/null +++ b/sys-kernel/dracut/files/045-systemdutildir.patch @@ -0,0 +1,45 @@ +From ed5cc98864c28eab2c4cb45ec0f67450699aaaa8 Mon Sep 17 00:00:00 2001 +From: Mike Gilbert <floppym@gentoo.org> +Date: Mon, 3 Jul 2017 22:39:42 -0400 +Subject: [PATCH] dracut.sh: improve udevdir and systemdutildir fallback logic + +Check for a common binary in systemdutildir. This resolves an issue on +split-usr systems, where it is common to have both /lib/systemd[/system] +and /usr/lib/systemd[/user] present. + +Check for systemd-udevd specifically, since some distros (Gentoo) allow +udev to be installed without the rest of the systemd stack. + +Similar logic is applied to udevdir simply for consistency. +--- + dracut.sh | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/dracut.sh b/dracut.sh +index 64d94201..67c12a72 100755 +--- a/dracut.sh ++++ b/dracut.sh +@@ -1266,16 +1266,16 @@ done + [[ -d $udevdir ]] \ + || udevdir="$(pkg-config udev --variable=udevdir 2>/dev/null)" + if ! [[ -d "$udevdir" ]]; then +- [[ ! -h /lib ]] && [[ -d /lib/udev ]] && udevdir=/lib/udev +- [[ -d /usr/lib/udev ]] && udevdir=/usr/lib/udev ++ [[ -e /lib/udev/collect ]] && udevdir=/lib/udev ++ [[ -e /usr/lib/udev/collect ]] && udevdir=/usr/lib/udev + fi + + [[ -d $systemdutildir ]] \ + || systemdutildir=$(pkg-config systemd --variable=systemdutildir 2>/dev/null) + + if ! [[ -d "$systemdutildir" ]]; then +- [[ ! -h /lib ]] && [[ -d /lib/systemd ]] && systemdutildir=/lib/systemd +- [[ -d /usr/lib/systemd ]] && systemdutildir=/usr/lib/systemd ++ [[ -e /lib/systemd/systemd-udevd ]] && systemdutildir=/lib/systemd ++ [[ -e /usr/lib/systemd/systemd-udevd ]] && systemdutildir=/usr/lib/systemd + fi + + [[ -d $systemdsystemunitdir ]] \ +-- +2.13.2 + |