summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorThierry Vignaud <tvignaud@mandriva.org>2003-10-03 14:57:10 +0000
committerThierry Vignaud <tvignaud@mandriva.org>2003-10-03 14:57:10 +0000
commit3e707482b91a952910675c927aeafbfc558f32fe (patch)
tree33f69d7c4bae2d56eba81b8034fbb86ba7e6b39d /perl-install
parent7ce5892b7a79e9653739c564e81034f535aa56c6 (diff)
downloaddrakx-3e707482b91a952910675c927aeafbfc558f32fe.tar
drakx-3e707482b91a952910675c927aeafbfc558f32fe.tar.gz
drakx-3e707482b91a952910675c927aeafbfc558f32fe.tar.bz2
drakx-3e707482b91a952910675c927aeafbfc558f32fe.tar.xz
drakx-3e707482b91a952910675c927aeafbfc558f32fe.zip
fix #425, #1881 (was there since 20021020 :-() : wireless adapters
settings were lost when altering network configuration when not from wizard mode
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/network/network.pm8
1 files changed, 6 insertions, 2 deletions
diff --git a/perl-install/network/network.pm b/perl-install/network/network.pm
index 12c0a0ba7..5a21d441c 100644
--- a/perl-install/network/network.pm
+++ b/perl-install/network/network.pm
@@ -153,7 +153,7 @@ sub write_resolv_conf {
}
sub write_interface_conf {
- my ($file, $intf, $_netc, $prefix) = @_;
+ my ($file, $intf, $netc, $prefix) = @_;
if ($intf->{HWADDR} && -e "$prefix/sbin/ip") {
$intf->{HWADDR} = undef;
@@ -174,7 +174,11 @@ sub write_interface_conf {
$intf->{BOOTPROTO} =~ s/dhcp.*/dhcp/;
- setVarsInSh($file, $intf, qw(DEVICE BOOTPROTO IPADDR NETMASK NETWORK BROADCAST ONBOOT HWADDR MII_NOT_SUPPORTED), if_($intf->{wireless_eth}, qw(WIRELESS_MODE WIRELESS_ESSID WIRELESS_NWID WIRELESS_FREQ WIRELESS_SENS WIRELESS_RATE WIRELESS_ENC_KEY WIRELESS_RTS WIRELESS_FRAG WIRELESS_IWCONFIG WIRELESS_IWSPY WIRELESS_IWPRIV)), if_($intf->{BOOTPROTO} eq "dhcp", qw(DHCP_HOSTNAME NEEDHOSTNAME)));
+ my %cards = map { $_->[0] => $_->[1] } network::ethernet::conf_network_card_backend($netc, $intf);
+ setVarsInSh($file, $intf, qw(DEVICE BOOTPROTO IPADDR NETMASK NETWORK BROADCAST ONBOOT HWADDR MII_NOT_SUPPORTED),
+ if_(is_wireless_intf($intf, $cards{$intf->{DEVICE}}), qw(WIRELESS_MODE WIRELESS_ESSID WIRELESS_NWID WIRELESS_FREQ WIRELESS_SENS WIRELESS_RATE WIRELESS_ENC_KEY WIRELESS_RTS WIRELESS_FRAG WIRELESS_IWCONFIG WIRELESS_IWSPY WIRELESS_IWPRIV)),
+ if_($intf->{BOOTPROTO} eq "dhcp", qw(DHCP_HOSTNAME NEEDHOSTNAME))
+ );
log::explanations("written $intf->{DEVICE} interface configuration in $file");
}