Skip to content

Commit 6c71ba4

Browse files
coibyjohannbg
authored andcommitted
fix(qeth_rules): check the existence of /sys/devices/qeth/*/online beforehand
On s390x KVM machines, the follow errors occurred, $ kdumpctl rebuild kdump: Rebuilding /boot/initramfs-4.18.0-321.el8.s390xkdump.img /usr/lib/dracut/modules.d/95qeth_rules/module-setup.sh: line 13: /sys/devices/qeth/*/online: No such file or directory /usr/lib/dracut/modules.d/95qeth_rules/module-setup.sh: line 13: /sys/devices/qeth/*/online: No such file or directory because s390x KVM uses virtual devices and /sys/devices/qeth/*/online doesn't exist. Eliminate this error by checking the existence beforehand.
1 parent a0f12fb commit 6c71ba4

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

modules.d/95qeth_rules/module-setup.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ check() {
1010

1111
[[ $hostonly ]] && {
1212
for i in /sys/devices/qeth/*/online; do
13+
[ ! -f "$i" ] && continue
1314
read -r _online < "$i"
1415
[ "$_online" -eq 1 ] && return 0
1516
done

0 commit comments

Comments
 (0)