Google
  Web www.spinics.net

[PATCH] Make sure network devices are configured on reboot on s390x (#795744)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


Relying on dracut to do this work for us, so just make sure the network
parameters are passed through to zipl.conf.
---
 pyanaconda/bootloader.py |    6 ++++++
 pyanaconda/network.py    |   20 ++++++++++++++++++++
 pyanaconda/platform.py   |    2 ++
 3 files changed, 28 insertions(+), 0 deletions(-)

diff --git a/pyanaconda/bootloader.py b/pyanaconda/bootloader.py
index 9462d74..b8073bb 100644
--- a/pyanaconda/bootloader.py
+++ b/pyanaconda/bootloader.py
@@ -854,6 +854,12 @@ class BootLoader(object):
                     self.boot_args.update(setup_args)
                     self.dracut_args.update(setup_args)
 
+                # XXX: hack for s390x on RHEL 7.0 Alpha 1
+                if iutil.isS390():
+                    setup_args = network.dracutSetupArgs(dep)
+                    self.boot_args.update(setup_args)
+                    self.dracut_args.update(setup_args)
+
         self.boot_args.update(dracut_storage.values())
         self.dracut_args.update(dracut_storage.values())
 
diff --git a/pyanaconda/network.py b/pyanaconda/network.py
index 339f3c6..ba5e0d8 100644
--- a/pyanaconda/network.py
+++ b/pyanaconda/network.py
@@ -869,6 +869,26 @@ class Network:
     def dracutSetupArgs(self, networkStorageDevice):
         netargs=set()
 
+        # XXX: hack for RHEL 7.0 Alpha 1, just force over the dracut network
+        # settings to the installed system
+        if iutil.isS390():
+            f = open("/proc/cmdline")
+            clargs = map(lambda x: x.strip(), f.read().split(' '))
+            f.close()
+
+            for clarg in clargs:
+                clarg = clarg.lower()
+                if clarg.startswith('ip=') or \
+                   clarg.startswith('ifname=') or \
+                   clarg.startswith('bootdev=') or \
+                   clarg.startswith('nameserver=') or \
+                   clarg.startswith('rd.neednet=') or \
+                   clarg.startswith('rd.znet='):
+                    netargs.add(clarg)
+
+            netargs.add('rd.neednet=1')
+            return netargs
+
         if networkStorageDevice.nic:
             # Storage bound to a specific nic (ie FCoE)
             nic = networkStorageDevice.nic
diff --git a/pyanaconda/platform.py b/pyanaconda/platform.py
index 018d8d1..72070d0 100644
--- a/pyanaconda/platform.py
+++ b/pyanaconda/platform.py
@@ -121,6 +121,8 @@ class Platform(object):
         _packages = self._packages
         if flags.cmdline.get('fips', None) == '1':
             _packages.append('dracut-fips')
+        if iutil.isS390():
+            _packages.append('dracut-network')
         return _packages
 
     def setDefaultPartitioning(self):
-- 
1.7.1

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list


[Home]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Red Hat 9 Bible]     [Fedora Bible]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]

Powered by Linux

Google
  Web www.spinics.net