On Mon, 2016-05-30 at 14:33 +0200, Radek Vykydal wrote:
Resolves: rhbz#1277975
This will allow to override special default of first network command which is --activate.
The use case is activating a device via boot options (eg for nfs mount of installation image or source) and using another configuration for target system via kickstart (nfs mount and installation could stale in this case if the ip address changes for example).
I was considering also making --activate option support optional arguments (allowing both for --activate for compatibility and --activate=no for this use case) but optparse used in rhel7 pykickstart doesn't allow for nargs=? (zero or one argument) as argparse does. https://www.redhat.com/archives/anaconda-devel-list/2016-May/msg00008.html
dracut/parse-kickstart | 3 ++- pyanaconda/network.py | 2 +- pyanaconda/ui/gui/spokes/network.py | 8 +++++++- pyanaconda/ui/tui/spokes/network.py | 7 ++++++- 4 files changed, 16 insertions(+), 4 deletions(-)
diff --git a/dracut/parse-kickstart b/dracut/parse-kickstart index 9c36402..08d536a 100755 --- a/dracut/parse-kickstart +++ b/dracut/parse-kickstart @@ -178,7 +178,8 @@ class Network(commands.network.RHEL7_Network, DracutArgsMixin): # first 'network' line if len(self.network) == 1: - net.activate = True + if not net.noactivate: + net.activate = True
This should be 'net.activate = not net.noactivate'.