From da188129369fdbff0dfb3d280255dfba91d736b4 Mon Sep 17 00:00:00 2001 From: Olivier Blin Date: Fri, 16 Sep 2005 16:10:32 +0000 Subject: automatically configure DSL connection on installation from DSL --- perl-install/install2.pm | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) (limited to 'perl-install/install2.pm') diff --git a/perl-install/install2.pm b/perl-install/install2.pm index 220114975..a7a29d35a 100644 --- a/perl-install/install2.pm +++ b/perl-install/install2.pm @@ -468,8 +468,22 @@ sub main { log::l("found network config file $file"); add2hash($o->{net}{resolv} ||= {}, network::network::read_resolv_conf($file)); } - $o->{net}{type} = 'lan'; - $o->{net}{net_interface} = first(values %{$o->{net}{ifcfg}}); + my $dsl_device = find { $_->{BOOTPROTO} eq 'adsl_pppoe' } values %{$o->{net}{ifcfg}}; + if ($dsl_device) { + $o->{net}{type} = 'adsl'; + $o->{net}{net_interface} = $dsl_device->{DEVICE}; + $o->{net}{adsl} = { + method => 'pppoe', + device => 'pppoe_modem', + ethernet_device => $dsl_device->{DEVICE}, + login => $dsl_device->{USER}, + password => $dsl_device->{PASS}, + }; + %$dsl_device = (); + } else { + $o->{net}{type} = 'lan'; + $o->{net}{net_interface} = first(values %{$o->{net}{ifcfg}}); + } } #- done after module dependencies are loaded for "vfat depends on fat" -- cgit v1.2.1