File 0504-ibft-fix-boot-flag-check.patch of Package dracut.16003
From 7eb60d945d6007a794530aba0ca103bef3853174 Mon Sep 17 00:00:00 2001
From: Thomas Blume <tblume@c1496.arch.suse.de>
Date: Wed, 14 Dec 2016 12:51:44 +0100
Subject: [PATCH] ibft fix boot flag check
---
modules.d/40network/net-lib.sh | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/modules.d/40network/net-lib.sh b/modules.d/40network/net-lib.sh
index d17209a..749dc47 100755
--- a/modules.d/40network/net-lib.sh
+++ b/modules.d/40network/net-lib.sh
@@ -270,10 +270,12 @@ ibft_to_cmdline() {
[ -e /tmp/net.${dev}.has_ibft_config ] && continue
[ -e ${iface}/flags ] && flags=$(read a < ${iface}/flags; echo $a)
- # Skip invalid interfaces
- (( $flags & 1 )) || continue
- # Skip interfaces not used for booting
- (( $flags & 2 )) || continue
+ # Skip invalid/non-booting interfaces
+ # Per spec, Bits 0 and 1 are valid and bootable,
+ # respectively, but some firmware only sets Bit 1,
+ # so just accept either bit
+ (( $flags & 3 )) || continue
+
[ -e ${iface}/dhcp ] && dhcp=$(read a < ${iface}/dhcp; echo $a)
[ -e ${iface}/origin ] && origin=$(read a < ${iface}/origin; echo $a)
[ -e ${iface}/ip-addr ] && ip=$(read a < ${iface}/ip-addr; echo $a)
--
2.10.2