Resolves: rhbz#788871 --- instdata.py | 6 ++++++ network.py | 21 +++++++++++++++++++++ yuminstall.py | 2 ++ 3 files changed, 29 insertions(+), 0 deletions(-) diff --git a/instdata.py b/instdata.py index f6903f3..01108b8 100644 --- a/instdata.py +++ b/instdata.py @@ -190,6 +190,12 @@ class InstallData: stdout="/dev/tty5", stderr="/dev/tty5", root=self.anaconda.rootPath) + if self.network.hasActiveIPoIBDevice(): + iutil.execWithRedirect("/sbin/chkconfig", + ["openibd", "on"], + stdout="/dev/tty5", stderr="/dev/tty5", + root=self.anaconda.rootPath) + if self.anaconda.isKickstart: for svc in self.ksdata.services["disabled"]: iutil.execWithRedirect("/sbin/chkconfig", diff --git a/network.py b/network.py index 4cdc294..50e5605 100644 --- a/network.py +++ b/network.py @@ -173,6 +173,21 @@ class NetworkDevice(SimpleConfigFile): elif dev.startswith('iucv'): self.info["TYPE"] = "IUCV" + def isIPoIB(self): + devname = self.info["DEVICE"] + try: + f = open("/sys/class/net/%s/type" % devname, "r") + except Exception, e: + log.error("Got an exception trying to get type of %s: " + "%s" %(devname, e)) + return None + type = f.read().strip() + f.close() + # ARPHRD_INFINIBAND macro from linux/if_arp.h + return type == "32" + + + class Network: def __init__(self): self.firstnetdevice = None @@ -443,6 +458,12 @@ class Network: return str + def hasActiveIPoIBDevice(self): + for device in self.netdevices.values(): + if device.get("onboot") and device.isIPoIB(): + return True + return False + def writeKS(self, f): devNames = self.netdevices.keys() devNames.sort() diff --git a/yuminstall.py b/yuminstall.py index 46ac375..456afe5 100644 --- a/yuminstall.py +++ b/yuminstall.py @@ -1285,6 +1285,8 @@ class YumBackend(AnacondaBackend): self.selectBestKernel(anaconda) self.selectBootloader() self.selectFSPackages(anaconda.id.fsset, anaconda.id.diskset) + if anaconda.id.network.hasActiveIPoIBDevice(): + self.selectPackage("openib") self.selectAnacondaNeeds() -- 1.7.4 _______________________________________________ Anaconda-devel-list mailing list Anaconda-devel-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/anaconda-devel-list