diff options
author | David L. Cantrell Jr <dcantrell@redhat.com> | 2008-01-17 13:21:42 -1000 |
---|---|---|
committer | David L. Cantrell Jr <dcantrell@redhat.com> | 2008-01-17 13:25:34 -1000 |
commit | 55ebcb946067bab70d4a89a49c2aea993c686ef9 (patch) | |
tree | 7b453c01729d25c911485fb47f9da2ce3c3ee897 | |
parent | 3ee59ef8127abbf96f9aa60dc77b3f08f27a50cd (diff) | |
download | anaconda-55ebcb946067bab70d4a89a49c2aea993c686ef9.tar.gz anaconda-55ebcb946067bab70d4a89a49c2aea993c686ef9.tar.xz anaconda-55ebcb946067bab70d4a89a49c2aea993c686ef9.zip |
If bootproto is dhcp, unset any static settings (#218489)
-rw-r--r-- | network.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/network.py b/network.py index 569e8ba96..565d23846 100644 --- a/network.py +++ b/network.py @@ -425,6 +425,12 @@ class Network: if len(dev.get("DESC")) > 0: f.write("# %s\n" % (dev.get("DESC"),)) + # if bootproto is dhcp, unset any static settings (#218489) + if dev.get('BOOTPROTO').lower() == 'dhcp': + dev.unset('IPADDR') + dev.unset('NETMASK') + dev.unset('GATEWAY') + # handle IPv6 settings correctly for the ifcfg file ipv6addr = dev.get('IPV6ADDR').lower() ipv6prefix = dev.get('IPV6PREFIX').lower() |