summaryrefslogtreecommitdiffstats
path: root/perl-install/network
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.org>2004-09-15 05:49:23 +0000
committerOlivier Blin <oblin@mandriva.org>2004-09-15 05:49:23 +0000
commitf5b6bbae101eebdeb0799a64e6bb09bd15f49f12 (patch)
tree153ccbd8b880fa79ae6d24bb4b2a5f32ba256820 /perl-install/network
parent63306a41862c225feba38b0420becebede1bcc15 (diff)
downloaddrakx-f5b6bbae101eebdeb0799a64e6bb09bd15f49f12.tar
drakx-f5b6bbae101eebdeb0799a64e6bb09bd15f49f12.tar.gz
drakx-f5b6bbae101eebdeb0799a64e6bb09bd15f49f12.tar.bz2
drakx-f5b6bbae101eebdeb0799a64e6bb09bd15f49f12.tar.xz
drakx-f5b6bbae101eebdeb0799a64e6bb09bd15f49f12.zip
(adsl_conf_backend) don't create empty pppoe.conf if the package isn't
installed
Diffstat (limited to 'perl-install/network')
-rw-r--r--perl-install/network/adsl.pm18
1 files changed, 11 insertions, 7 deletions
diff --git a/perl-install/network/adsl.pm b/perl-install/network/adsl.pm
index 05c320f20..f3fb6b050 100644
--- a/perl-install/network/adsl.pm
+++ b/perl-install/network/adsl.pm
@@ -319,13 +319,17 @@ user "$adsl->{login}"
}
if ($adsl_type eq 'pppoe') {
- my $net_device = $modems{$adsl_device}{get_intf} ? "`$modems{$adsl_device}{get_intf}`" : $netc->{NET_DEVICE};
- substInFile {
- s/ETH=.*\n/ETH=$net_device\n/;
- s/USER=.*\n/USER=$adsl->{login}\n/;
- s/DNS1=.*\n/DNS1=$netc->{dnsServer2}\n/;
- s/DNS2=.*\n/DNS2=$netc->{dnsServer3}\n/;
- } "$::prefix/etc/ppp/pppoe.conf";
+ if (-f "$::prefix/etc/ppp/pppoe.conf") {
+ my $net_device = $modems{$adsl_device}{get_intf} ? "`$modems{$adsl_device}{get_intf}`" : $netc->{NET_DEVICE};
+ substInFile {
+ s/ETH=.*\n/ETH=$net_device\n/;
+ s/USER=.*\n/USER=$adsl->{login}\n/;
+ s/DNS1=.*\n/DNS1=$netc->{dnsServer2}\n/;
+ s/DNS2=.*\n/DNS2=$netc->{dnsServer3}\n/;
+ } "$::prefix/etc/ppp/pppoe.conf";
+ } else {
+ log::l("can't find pppoe.conf, make sure the rp-pppoe package is installed");
+ }
}
# pppoe => {