summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorFrancois Pons <fpons@mandriva.com>2003-02-26 14:25:21 +0000
committerFrancois Pons <fpons@mandriva.com>2003-02-26 14:25:21 +0000
commit25f1f4f08086f42958eb2f8ff0a88494f6918457 (patch)
tree4c5bc9da1f173938a0f650eade6a78b93c98c735 /perl-install
parent4671e7781b7d8bfa5b356fd1337939c8b40f9acb (diff)
downloaddrakx-25f1f4f08086f42958eb2f8ff0a88494f6918457.tar
drakx-25f1f4f08086f42958eb2f8ff0a88494f6918457.tar.gz
drakx-25f1f4f08086f42958eb2f8ff0a88494f6918457.tar.bz2
drakx-25f1f4f08086f42958eb2f8ff0a88494f6918457.tar.xz
drakx-25f1f4f08086f42958eb2f8ff0a88494f6918457.zip
add probe of internet connection (this could avoid strange behaviour).
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/network/network.pm12
1 files changed, 10 insertions, 2 deletions
diff --git a/perl-install/network/network.pm b/perl-install/network/network.pm
index ebb2fd505..c04cfcca6 100644
--- a/perl-install/network/network.pm
+++ b/perl-install/network/network.pm
@@ -456,8 +456,8 @@ sub proxy_configure {
}
sub read_all_conf {
- my ($prefix, $netc, $intf) = @_;
- $netc ||= {}; $intf ||= {};
+ my ($prefix, $netc, $intf, $netcnx) = @_;
+ $netc ||= {}; $intf ||= {}; $netcnx ||= {};
add2hash($netc, read_conf("$prefix/etc/sysconfig/network")) if -r "$prefix/etc/sysconfig/network";
add2hash($netc, read_resolv_conf());
add2hash($netc, read_tmdns_conf("$prefix/etc/tmdns.conf")) if -r "$prefix/etc/tmdns.conf";
@@ -467,6 +467,14 @@ sub read_all_conf {
add2hash($intf, { getVarsFromSh("$prefix/etc/sysconfig/network-scripts/$_") });
}
}
+ #- try to probe $netcnx->{type} which is used almost everywhere.
+ unless ($netcnx->{type}) {
+ #- ugly hack to determine network type (avoid saying not configured in summary).
+ $intf->{eth0} and $netcnx->{type} ||= 'lan';
+ $intf->{ppp0} and $netcnx->{type} ||= 'modem';
+ -e "$prefix/etc/ppp/peers/adsl" and $netcnx->{type} ||= 'adsl'; # enough ?
+ -e "$prefix/etc/ppp/ioptions1B" || -e "$prefix/etc/ppp/ioptions2B" and $netcnx->{type} ||= 'isdn'; # enough ?
+ }
}
sub easy_dhcp {