summaryrefslogtreecommitdiffstats
path: root/perl-install/install_steps.pm
diff options
context:
space:
mode:
authorFrancois Pons <fpons@mandriva.com>2000-04-25 16:12:35 +0000
committerFrancois Pons <fpons@mandriva.com>2000-04-25 16:12:35 +0000
commit25946f2b1829f207aab844f3464ce515a50f15cc (patch)
treea6141f24a052d20499f34fb6ea92738273eacd79 /perl-install/install_steps.pm
parent4a62fb92b80fad9ba61cf0b4dd74fc5b03dcd94d (diff)
downloaddrakx-25946f2b1829f207aab844f3464ce515a50f15cc.tar
drakx-25946f2b1829f207aab844f3464ce515a50f15cc.tar.gz
drakx-25946f2b1829f207aab844f3464ce515a50f15cc.tar.bz2
drakx-25946f2b1829f207aab844f3464ce515a50f15cc.tar.xz
drakx-25946f2b1829f207aab844f3464ce515a50f15cc.zip
*** empty log message ***
Diffstat (limited to 'perl-install/install_steps.pm')
-rw-r--r--perl-install/install_steps.pm22
1 files changed, 20 insertions, 2 deletions
diff --git a/perl-install/install_steps.pm b/perl-install/install_steps.pm
index 6ba1ebb13..363149d52 100644
--- a/perl-install/install_steps.pm
+++ b/perl-install/install_steps.pm
@@ -477,9 +477,11 @@ sub pppConfig {
do { $replaced ||= 1
if s/^\s*$toreplace{login}\s+ppp0\s+(\S+)/$toreplace{login} ppp0 $toreplace{passwd}/; } foreach @l;
if ($replaced) {
+ local *F;
open F, ">$o->{prefix}/etc/ppp/pap-secrets" or die "Can't open $o->{prefix}/etc/ppp/pap-secrets $!";
print F @l;
} else {
+ local *F;
open F, ">>$o->{prefix}/etc/ppp/pap-secrets" or die "Can't open $o->{prefix}/etc/ppp/pap-secrets $!";
print F "$toreplace{login} ppp0 $toreplace{passwd}\n";
}
@@ -843,12 +845,12 @@ sub generateAutoInstFloppy($) {
#------------------------------------------------------------------------------
sub upNetwork {
- my ($o) = @_;
+ my ($o, $pppAvoided) = @_;
modules::write_conf("$o->{prefix}/etc/conf.modules");
if ($o->{intf} && $o->{netc}{NETWORKING} ne 'false') {
network::up_it($o->{prefix}, $o->{intf});
- } elsif ($o->{modem} && !$o->{modem}{isUp}) {
+ } elsif (!$pppAvoided && $o->{modem} && !$o->{modem}{isUp}) {
run_program::rooted($o->{prefix}, "ifup", "ppp0");
$o->{modem}{isUp} = 1;
} else {
@@ -858,6 +860,22 @@ sub upNetwork {
}
#------------------------------------------------------------------------------
+sub downNetwork {
+ my ($o, $pppOnly) = @_;
+
+ modules::write_conf("$o->{prefix}/etc/conf.modules");
+ if (!$pppOnly && $o->{intf} && $o->{netc}{NETWORKING} ne 'false') {
+ network::down_it($o->{prefix}, $o->{intf});
+ } elsif ($o->{modem} && $o->{modem}{isUp}) {
+ run_program::rooted($o->{prefix}, "ifup", "ppp0");
+ $o->{modem}{isUp} = 0;
+ } else {
+ $::testing or return;
+ }
+ 1;
+}
+
+#------------------------------------------------------------------------------
sub cleanIfFailedUpgrade($) {
my ($o) = @_;