summaryrefslogtreecommitdiffstats
path: root/perl-install/install_steps.pm
diff options
context:
space:
mode:
authorFrancois Pons <fpons@mandriva.com>2000-04-14 15:11:57 +0000
committerFrancois Pons <fpons@mandriva.com>2000-04-14 15:11:57 +0000
commit21066f8c4d8d136cca65f7138cabb25d4b4cfe8c (patch)
treee51a023cbbbdea6ad22b962dc4e573603c67f31a /perl-install/install_steps.pm
parent3f3ced984833bf1084447c1afd3cfc7d17d0838b (diff)
downloaddrakx-backup-do-not-use-21066f8c4d8d136cca65f7138cabb25d4b4cfe8c.tar
drakx-backup-do-not-use-21066f8c4d8d136cca65f7138cabb25d4b4cfe8c.tar.gz
drakx-backup-do-not-use-21066f8c4d8d136cca65f7138cabb25d4b4cfe8c.tar.bz2
drakx-backup-do-not-use-21066f8c4d8d136cca65f7138cabb25d4b4cfe8c.tar.xz
drakx-backup-do-not-use-21066f8c4d8d136cca65f7138cabb25d4b4cfe8c.zip
*** empty log message ***
Diffstat (limited to 'perl-install/install_steps.pm')
-rw-r--r--perl-install/install_steps.pm9
1 files changed, 6 insertions, 3 deletions
diff --git a/perl-install/install_steps.pm b/perl-install/install_steps.pm
index cb81ad4ff..e5062bd66 100644
--- a/perl-install/install_steps.pm
+++ b/perl-install/install_steps.pm
@@ -427,7 +427,8 @@ sub pppConfig {
$toreplace{$_} = $o->{modem}{$_} foreach qw(connection phone login passwd auth domain dns1 dns2);
$toreplace{kpppauth} = ${{ 'Script-based' => 0, 'PAP' => 1, 'Terminal-based' => 2, 'CHAP' => 3, }}{$o->{modem}{auth}};
$toreplace{phone} =~ s/\D//g;
- $toreplace{dnsserver} = join '', map { "$o->{modem}{$_}," } "dns1", "dns2";
+ $toreplace{dnsserver} = join ',', map { $o->{modem}{$_} } "dns1", "dns2";
+ $toreplace{dnsserver} .= $toreplace{dnsserver} && ',';
#- using peerdns or dns1,dns2 avoid writing a /etc/resolv.conf file.
$toreplace{peerdns} = "yes";
@@ -437,7 +438,8 @@ sub pppConfig {
$toreplace{intf} ||= 'ppp0';
if ($o->{modem}{auth} eq 'PAP') {
- template2file("/usr/share/ifcfg-ppp.pap.in", "$o->{prefix}/etc/sysconfig/network-scripts/ifcfg-ppp0", %toreplace);
+ template2file($toreplace{dnsserver} ? "/usr/share/ifcfg-ppp.pap.dns.in" : "/usr/share/ifcfg-ppp.pap.in",
+ "$o->{prefix}/etc/sysconfig/network-scripts/ifcfg-ppp0", %toreplace);
template2file("/usr/share/chat-ppp.pap.in", "$o->{prefix}/etc/sysconfig/network-scripts/chat-ppp0", %toreplace);
my @l = cat_("$o->{prefix}/etc/ppp/pap-secrets");
@@ -452,7 +454,8 @@ sub pppConfig {
print F "$toreplace{login} ppp0 $toreplace{passwd}\n";
}
} elsif ($o->{modem}{auth} eq 'Terminal-based' || $o->{modem}{auth} eq 'Script-based') {
- template2file("/usr/share/ifcfg-ppp.script.in", "$o->{prefix}/etc/sysconfig/network-scripts/ifcfg-ppp0", %toreplace);
+ template2file($toreplace{dnsserver} ? "/usr/share/ifcfg-ppp.script.dns.in" : "/usr/share/ifcfg-ppp.script.in",
+ "$o->{prefix}/etc/sysconfig/network-scripts/ifcfg-ppp0", %toreplace);
template2file("/usr/share/chat-ppp.script.in", "$o->{prefix}/etc/sysconfig/network-scripts/chat-ppp0", %toreplace);
} #- no CHAP currently.