summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
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 {