When using LAYER2=1 VSWITCH=1 in your CMS conf file on s390x, the ifcfg file written by anaconda will result in a non-working network connection on reboot after installation. When LAYER2=1, we already prevent writing of the HWADDR to the ifcfg file, but when VSWITCH=1, we need to write ARP=0 to the ifcfg file as well. Make sure to carry over VSWITCH in linuxrc.s390, but also make sure we don't write it to the final ifcfg file on the target system. --- loader/linuxrc.s390 | 1 + network.py | 13 ++++++++++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/loader/linuxrc.s390 b/loader/linuxrc.s390 index c862a84..82a741c 100644 --- a/loader/linuxrc.s390 +++ b/loader/linuxrc.s390 @@ -3040,6 +3040,7 @@ fi [ "$PORTNAME" != "" ] && echo "PORTNAME=$PORTNAME" >> $IFCFGFILE [ "$CTCPROT" != "" ] && echo "CTCPROT=$CTCPROT" >> $IFCFGFILE [ "$MACADDR" != "" ] && echo "MACADDR=$MACADDR" >> $IFCFGFILE +[ "$VSWITCH" != "" ] && echo "VSWITCH=$VSWITCH" >> $IFCFGFILE optstr="" for option in LAYER2 PORTNO; do [ -z "${!option}" ] && continue diff --git a/network.py b/network.py index 2fabff1..bb8ca09 100644 --- a/network.py +++ b/network.py @@ -244,9 +244,16 @@ class NetworkDevice(SimpleConfigFile): keys.remove("DESC") if "KEY" in keys: keys.remove("KEY") - if iutil.isS390() and ("OPTIONS" in keys) and ("HWADDR" in keys) and \ - (self.info["OPTIONS"].find("layer2=1") != -1): - keys.remove("HWADDR") + if iutil.isS390() and ("OPTIONS" in keys): + if self.info["OPTIONS"].find("layer2=1") != -1: + if "HWADDR" in keys: + keys.remove("HWADDR") + + if ("VSWITCH" in keys) and (self.info["VSWITCH"] == "1"): + keys.append("ARP") + self.info["ARP"] = "0" + if "VSWITCH" in keys: + keys.remove("VSWITCH") for key in keys: if (key == 'NAME') or \ -- 1.6.6 _______________________________________________ Anaconda-devel-list mailing list Anaconda-devel-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/anaconda-devel-list