[PATCH 3/3 master/newui] Write TYPE= in default ifcfg files.

Radek Vykydal rvykydal at redhat.com
Wed Jul 11 12:51:42 UTC 2012


We'll probably need to update dracut with TYPE=InfiniBand
so that we keep ipoib support added in rhel 6.
---
 dracut/anaconda-write-default-ifcfg.sh |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/dracut/anaconda-write-default-ifcfg.sh b/dracut/anaconda-write-default-ifcfg.sh
index 98018e8..c6476cb 100755
--- a/dracut/anaconda-write-default-ifcfg.sh
+++ b/dracut/anaconda-write-default-ifcfg.sh
@@ -6,9 +6,12 @@ for interface in /sys/class/net/*; do
 
     ifname=${interface##*/}
 
+    iftype=""
     case $(cat /sys/class/net/$ifname/type) in
         # ARPHRD_ETHER, ARPHRD_INFINIBAND, ARPHRD_SLIP
-        1|32|256) ;;
+        1)  iftype="Ethernet" ;;
+        32) iftype="InfiniBand" ;;
+        256) ;;
         *) continue ;;
     esac
 
@@ -20,6 +23,7 @@ for interface in /sys/class/net/*; do
             echo "ONBOOT=no"
             echo "HWADDR=$(cat /sys/class/net/$ifname/address)"
             echo "UUID=$(cat /proc/sys/kernel/random/uuid)"
+            [ -n "$iftype" ] && echo "TYPE=$iftype"
         } > /run/initramfs/state/etc/sysconfig/network-scripts/ifcfg-$ifname
     fi
 
-- 
1.7.4



More information about the anaconda-patches mailing list