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