diff options
author | David Cantrell <dcantrell@redhat.com> | 2008-10-02 02:26:31 -1000 |
---|---|---|
committer | David Cantrell <dcantrell@redhat.com> | 2008-10-02 02:26:31 -1000 |
commit | 47138291a6ee6e38aed60bee72c477df683f3c86 (patch) | |
tree | e2e81afa78cade0f295eb75c36dd29ceb2deba2e /textw | |
parent | 3f7a9d9b41ee4c363d00467b21dedba1d97832be (diff) | |
download | anaconda-47138291a6ee6e38aed60bee72c477df683f3c86.tar.gz anaconda-47138291a6ee6e38aed60bee72c477df683f3c86.tar.xz anaconda-47138291a6ee6e38aed60bee72c477df683f3c86.zip |
Automatically select NIC based on ksdevice= boot parameter.
If you boot with boot.iso and pass ksdevice=DEVICE or
ksdevice=MACADDR, use that to automatically select the NIC to use
when we ask the user to bring up the network for installation.
Diffstat (limited to 'textw')
-rw-r--r-- | textw/netconfig_text.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/textw/netconfig_text.py b/textw/netconfig_text.py index 92b245b40..dcf359e32 100644 --- a/textw/netconfig_text.py +++ b/textw/netconfig_text.py @@ -97,6 +97,9 @@ class NetworkConfiguratorText: netdevs = self.anaconda.id.network.available() devs = netdevs.keys() devs.sort() + ksdevice = self.anaconda.id.network.getKSDevice().get('DEVICE') + selected_interface = None + for dev in devs: desc = netdevs[dev].get("DESC") if desc: @@ -104,8 +107,16 @@ class NetworkConfiguratorText: else: desc = dev + if selected_interface is None: + selected_interface = desc + + if ksdevice == dev: + selected_interface = desc + self.interfaceList.append(desc) + self.interfaceList.setCurrent(selected_interface) + grid.add(self.interfaceList, 0, 1, padding = (0, 0, 0, 1)) self.dhcpCheckbox = Checkbox(_("Use dynamic IP configuration (DHCP)"), 1) |