summaryrefslogtreecommitdiffstats
path: root/perl-install/network/modem.pm
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.org>2005-09-08 13:00:56 +0000
committerOlivier Blin <oblin@mandriva.org>2005-09-08 13:00:56 +0000
commitf756327e8545b80bf4a11c474531f66309cbf15a (patch)
tree2ff4483610286d98e02affc5451ba420dd0d50d7 /perl-install/network/modem.pm
parent860527531642dff6be6cecf0f2787500ed6a4702 (diff)
downloaddrakx-backup-do-not-use-f756327e8545b80bf4a11c474531f66309cbf15a.tar
drakx-backup-do-not-use-f756327e8545b80bf4a11c474531f66309cbf15a.tar.gz
drakx-backup-do-not-use-f756327e8545b80bf4a11c474531f66309cbf15a.tar.bz2
drakx-backup-do-not-use-f756327e8545b80bf4a11c474531f66309cbf15a.tar.xz
drakx-backup-do-not-use-f756327e8545b80bf4a11c474531f66309cbf15a.zip
do not let modem settings be overriden by previous ppp0 settings
Diffstat (limited to 'perl-install/network/modem.pm')
-rw-r--r--perl-install/network/modem.pm61
1 files changed, 29 insertions, 32 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;