summaryrefslogtreecommitdiffstats
path: root/perl-install/network/network.pm
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.org>2004-08-27 11:49:48 +0000
committerOlivier Blin <oblin@mandriva.org>2004-08-27 11:49:48 +0000
commit8fb993e064a06b3958a498a588e37500937af881 (patch)
tree2c0c8b7a9ede7bb0cb855e6db473056960b246b5 /perl-install/network/network.pm
parent59af944646e11f6806f84e48c3b6b0ebc0385437 (diff)
downloaddrakx-8fb993e064a06b3958a498a588e37500937af881.tar
drakx-8fb993e064a06b3958a498a588e37500937af881.tar.gz
drakx-8fb993e064a06b3958a498a588e37500937af881.tar.bz2
drakx-8fb993e064a06b3958a498a588e37500937af881.tar.xz
drakx-8fb993e064a06b3958a498a588e37500937af881.zip
write metric in ifcfg files according to connection type
Diffstat (limited to 'perl-install/network/network.pm')
-rw-r--r--perl-install/network/network.pm3
1 files changed, 2 insertions, 1 deletions
diff --git a/perl-install/network/network.pm b/perl-install/network/network.pm
index 7be0aa698..2b07a95b9 100644
--- a/perl-install/network/network.pm
+++ b/perl-install/network/network.pm
@@ -154,13 +154,14 @@ sub write_interface_conf {
ONBOOT => bool2yesno(!member($intf->{DEVICE}, map { $_->{device} } detect_devices::pcmcia_probe())),
});
+ defined($intf->{METRIC}) or $intf->{METRIC} = network::tools::get_default_metric(network::tools::get_interface_type($intf)),
$intf->{BOOTPROTO} =~ s/dhcp.*/dhcp/;
if (local $intf->{WIRELESS_ENC_KEY} = $intf->{WIRELESS_ENC_KEY}) {
network::tools::convert_wep_key_for_iwconfig($intf->{WIRELESS_ENC_KEY});
}
- setVarsInSh($file, $intf, qw(DEVICE BOOTPROTO IPADDR NETMASK NETWORK BROADCAST ONBOOT HWADDR MII_NOT_SUPPORTED),
+ setVarsInSh($file, $intf, qw(DEVICE BOOTPROTO IPADDR NETMASK NETWORK BROADCAST ONBOOT HWADDR METRIC MII_NOT_SUPPORTED),
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)),
if_($intf->{DEVICE} =~ /^ippp\d+$/, qw(DIAL_ON_IFUP))