diff options
Diffstat (limited to 'perl-install')
-rw-r--r-- | perl-install/network/modem.pm | 61 | ||||
-rw-r--r-- | perl-install/network/netconnect.pm | 2 | ||||
-rwxr-xr-x | perl-install/standalone/drakconnect | 2 |
3 files changed, 31 insertions, 34 deletions
diff --git a/perl-install/network/modem.pm b/perl-install/network/modem.pm index f04085e89..838224f85 100644 --- a/perl-install/network/modem.pm +++ b/perl-install/network/modem.pm @@ -53,7 +53,7 @@ sub ppp_read_conf() { #-----modem conf sub ppp_configure { - my ($in, $modem) = @_; + my ($net, $in, $modem) = @_; $in->do_pkgs->install('ppp') if !$::testing; $in->do_pkgs->install('kdenetwork-kppp') if !$::testing && $in->do_pkgs->is_installed('kdebase'); @@ -75,7 +75,6 @@ sub ppp_configure { $toreplace{connection} ||= 'DialupConnection'; $toreplace{domain} ||= 'localdomain'; - $toreplace{intf} ||= 'ppp0'; $toreplace{papname} = $toreplace{login} if member($modem->{Authentication}, 1, 3, 4); # handle static/dynamic settings: @@ -88,36 +87,34 @@ sub ppp_configure { $toreplace{METRIC} = defined($modem->{METRIC}) ? $modem->{METRIC} : network::tools::get_default_metric("modem"); - #- build ifcfg-ppp0. - my $various = <<END; -DEVICE="$toreplace{intf}" -ONBOOT="no" -USERCTL="no" -MODEMPORT="/dev/modem" -LINESPEED="115200" -PERSIST="yes" -DEFABORT="yes" -DEBUG="yes" -INITSTRING="ATZ" -DEFROUTE="yes" -HARDFLOWCTL="yes" -ESCAPECHARS="no" -PPPOPTIONS="" -PAPNAME="$toreplace{papname}" -REMIP="" -NETMASK="" -IPADDR="" -MRU="" -MTU="" -DISCONNECTTIMEOUT="5" -RETRYTIMEOUT="60" -BOOTPROTO="none" -PEERDNS="$toreplace{peerdns}" -METRIC=$toreplace{METRIC} -END - output("$::prefix/etc/sysconfig/network-scripts/ifcfg-ppp0", - $various, - if_($modem->{auto_dns} ne N("Automatic"), map { qq(DNS$_=$toreplace{"dns$_"}\n) } grep { $toreplace{"dns$_"} } 1..2)); + $net->{ifcfg}{ppp0} = { + DEVICE => "ppp0", + ONBOOT => "no", + USERCTL => "no", + MODEMPORT => "/dev/modem", + LINESPEED => "115200", + PERSIST => "yes", + DEFABORT => "yes", + DEBUG => "yes", + INITSTRING => "ATZ", + DEFROUTE => "yes", + HARDFLOWCTL => "yes", + ESCAPECHARS => "no", + PPPOPTIONS => "", + PAPNAME => $toreplace{papname}, + REMIP => "", + NETMASK => "", + IPADDR => "", + MRU => "", + MTU => "", + DISCONNECTTIMEOUT => "5", + RETRYTIMEOUT => "60", + BOOTPROTO => "none", + PEERDNS => $toreplace{peerdns}, + METRIC => $toreplace{METRIC}, + if_($modem->{auto_dns} ne N("Automatic"), + map { qq(DNS$_=$toreplace{"dns$_"}\n) } grep { $toreplace{"dns$_"} } 1..2), + }; #- build chat-ppp0. my @chat = <<END; diff --git a/perl-install/network/netconnect.pm b/perl-install/network/netconnect.pm index 0b100f584..172a527bc 100644 --- a/perl-install/network/netconnect.pm +++ b/perl-install/network/netconnect.pm @@ -616,7 +616,7 @@ Take a look at http://www.linmodems.org"), ]; }, post => sub { - network::modem::ppp_configure($in, $modem); + network::modem::ppp_configure($net, $in, $modem); $net->{net_interface} = 'ppp0'; "allow_user_ctl"; }, diff --git a/perl-install/standalone/drakconnect b/perl-install/standalone/drakconnect index 9f41d9751..bd04c475b 100755 --- a/perl-install/standalone/drakconnect +++ b/perl-install/standalone/drakconnect @@ -272,7 +272,7 @@ sub build_tree { elsif ($interface eq 'modem') { $intf->{pages} = { 'TCP/IP' => 1, 'Account' => 1, 'Modem' => 1, 'Options' => 1 }; put_in_hash($intf, network::modem::ppp_read_conf()); - $intf->{save} = sub { network::modem::ppp_configure($in, $intf) }; + $intf->{save} = sub { network::modem::ppp_configure($net, $in, $intf) }; } elsif ($interface eq 'isdn') { $intf->{pages} = { 'TCP/IP' => 1, 'Account' => 1, 'Modem' => 1, 'Options' => 1 }; |