1 Star 0 Fork 16

gaohongmei/dracut

forked from src-anolis-os/dracut 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0086.patch 2.75 KB
一键复制 编辑 原始数据 按行查看 历史
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
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/gaohongmei/dracut.git
git@gitee.com:gaohongmei/dracut.git
gaohongmei
dracut
dracut
a8

搜索帮助