80 lines
2.8 KiB
Diff
80 lines
2.8 KiB
Diff
From fc05c818dd862de2b6771dabe242bc9d26aa2160 Mon Sep 17 00:00:00 2001
|
|
From: Jan Synacek <jsynacek@redhat.com>
|
|
Date: Thu, 11 Jun 2020 11:29:41 +0200
|
|
Subject: [PATCH] Adapt to the new udevadm version output
|
|
|
|
See https://bugzilla.redhat.com/show_bug.cgi?id=1804252.
|
|
|
|
RHEL-only
|
|
|
|
Resolves: #1846034
|
|
---
|
|
dracut-init.sh | 2 +-
|
|
modules.d/01fips/fips.sh | 2 +-
|
|
modules.d/99base/dracut-lib.sh | 4 ++--
|
|
modules.d/99base/init.sh | 2 +-
|
|
4 files changed, 5 insertions(+), 5 deletions(-)
|
|
|
|
diff --git a/dracut-init.sh b/dracut-init.sh
|
|
index ab07cabf..032c38c2 100644
|
|
--- a/dracut-init.sh
|
|
+++ b/dracut-init.sh
|
|
@@ -444,7 +444,7 @@ inst_rules_wildcard() {
|
|
}
|
|
|
|
prepare_udev_rules() {
|
|
- [ -z "$UDEVVERSION" ] && export UDEVVERSION=$(udevadm --version)
|
|
+ [ -z "$UDEVVERSION" ] && export UDEVVERSION=$(udevadm --version | { read v _ ; echo $v ; })
|
|
|
|
for f in "$@"; do
|
|
f="${initdir}/etc/udev/rules.d/$f"
|
|
diff --git a/modules.d/01fips/fips.sh b/modules.d/01fips/fips.sh
|
|
index 559952ca..03da6861 100755
|
|
--- a/modules.d/01fips/fips.sh
|
|
+++ b/modules.d/01fips/fips.sh
|
|
@@ -27,7 +27,7 @@ mount_boot()
|
|
|
|
if ! [ -e "$boot" ]; then
|
|
udevadm trigger --action=add >/dev/null 2>&1
|
|
- [ -z "$UDEVVERSION" ] && UDEVVERSION=$(udevadm --version)
|
|
+ [ -z "$UDEVVERSION" ] && UDEVVERSION=$(udevadm --version | { read v _ ; echo $v ; })
|
|
i=0
|
|
while ! [ -e $boot ]; do
|
|
if [ $UDEVVERSION -ge 143 ]; then
|
|
diff --git a/modules.d/99base/dracut-lib.sh b/modules.d/99base/dracut-lib.sh
|
|
index 56dd63ef..96dd55ad 100755
|
|
--- a/modules.d/99base/dracut-lib.sh
|
|
+++ b/modules.d/99base/dracut-lib.sh
|
|
@@ -531,7 +531,7 @@ incol2() {
|
|
}
|
|
|
|
udevsettle() {
|
|
- [ -z "$UDEVVERSION" ] && export UDEVVERSION=$(udevadm --version)
|
|
+ [ -z "$UDEVVERSION" ] && export UDEVVERSION=$(udevadm --version | { read v _ ; echo $v ; })
|
|
|
|
if [ $UDEVVERSION -ge 143 ]; then
|
|
udevadm settle --exit-if-exists=$hookdir/initqueue/work $settle_exit_if_exists
|
|
@@ -541,7 +541,7 @@ udevsettle() {
|
|
}
|
|
|
|
udevproperty() {
|
|
- [ -z "$UDEVVERSION" ] && export UDEVVERSION=$(udevadm --version)
|
|
+ [ -z "$UDEVVERSION" ] && export UDEVVERSION=$(udevadm --version | { read v _ ; echo $v ; })
|
|
|
|
if [ $UDEVVERSION -ge 143 ]; then
|
|
for i in "$@"; do udevadm control --property=$i; done
|
|
diff --git a/modules.d/99base/init.sh b/modules.d/99base/init.sh
|
|
index a5633936..732a7f46 100755
|
|
--- a/modules.d/99base/init.sh
|
|
+++ b/modules.d/99base/init.sh
|
|
@@ -92,7 +92,7 @@ fi
|
|
|
|
trap "emergency_shell Signal caught!" 0
|
|
|
|
-export UDEVVERSION=$(udevadm --version)
|
|
+export UDEVVERSION=$(udevadm --version | { read v _ ; echo $v ; })
|
|
if [ $UDEVVERSION -gt 166 ]; then
|
|
# newer versions of udev use /run/udev/rules.d
|
|
export UDEVRULESD=/run/udev/rules.d
|
|
|