diff options
author | David Cantrell <dcantrell@redhat.com> | 2006-12-12 17:41:04 +0000 |
---|---|---|
committer | David Cantrell <dcantrell@redhat.com> | 2006-12-12 17:41:04 +0000 |
commit | 02260f4e3c56557cafe9db562325f3647dc60140 (patch) | |
tree | a59daaa704925cc24c15a8f4c21830826504b22d /loader2/net.c | |
parent | f47fc2ae5bf8da905df09a93020aa6da0d96b75e (diff) | |
download | anaconda-02260f4e3c56557cafe9db562325f3647dc60140.tar.gz anaconda-02260f4e3c56557cafe9db562325f3647dc60140.tar.xz anaconda-02260f4e3c56557cafe9db562325f3647dc60140.zip |
This new UI change is meant to match (as much as possible) what users see
in stage 1 and what users can see in the text mode version of stage 2.
These changes are meant for RHEL-5 as well.
* ui/netpostconfig.glade: Defines the Edit Network Device window used
in the stage 2 part of anaconda.
* loader2/net.c (writeNetInfo): Write out IPv6 settings.
* network.py (Network): Move the useIPv4 and useIPv6 flags to be per
device rather than per system.
* iw/network_gui.py: Removed old code in editDevice(), replaced with
NetworkDeviceEditWindow class. Removed the awful mess of input
validation code I had since the new dialog box handles all of that.
Support independent IPv4 and IPv6 stack configuration per device and
offer IPv6 automatic neighbor discovery in addition to DHCPv6 and
static configuration (#213110, #213112).
Diffstat (limited to 'loader2/net.c')
-rw-r--r-- | loader2/net.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/loader2/net.c b/loader2/net.c index 04b954790..d66922773 100644 --- a/loader2/net.c +++ b/loader2/net.c @@ -1364,7 +1364,7 @@ int writeNetInfo(const char * fn, struct networkDeviceConfig * dev) { } else { fprintf(f, "BOOTPROTO=static\n"); - tip = &(dev->dev.ip); + tip = &(dev->dev.ipv4); inet_ntop(tip->sa_family, IP_ADDR(tip), ret, IP_STRLEN(tip)); fprintf(f, "IPADDR=%s\n", ret); @@ -1385,6 +1385,18 @@ int writeNetInfo(const char * fn, struct networkDeviceConfig * dev) { } } + if (!dev->noipv6) { + if (dev->ipv6method == IPV6_AUTO_METHOD) { + fprintf(f, "IPV6_AUTOCONF=yes\n"); + } else if (dev->ipv6method == IPV6_DHCP_METHOD) { + fprintf(f, "IPV6ADDR=dhcp\n"); + } else { + tip = &(dev->dev.ipv6); + inet_ntop(tip->sa_family, IP_ADDR(tip), ret, IP_STRLEN(tip)); + fprintf(f, "IPV6ADDR=%s/%d\n", ret, dev->dev.ipv6_prefixlen); + } + } + if (dev->dev.set & PUMP_NETINFO_HAS_HOSTNAME) fprintf(f, "HOSTNAME=%s\n", dev->dev.hostname); if (dev->dev.set & PUMP_NETINFO_HAS_DOMAIN) |