Skip to content

Commit

Permalink
Adapt to the new udevadm version output
Browse files Browse the repository at this point in the history
See https://bugzilla.redhat.com/show_bug.cgi?id=1804252.

RHEL-only

Resolves: #1846034
  • Loading branch information
Jan Synacek authored and haraldh committed Jun 25, 2020
1 parent 689454c commit fc05c81
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion dracut-init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion modules.d/01fips/fips.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions modules.d/99base/dracut-lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion modules.d/99base/init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit fc05c81

Please sign in to comment.