summaryrefslogtreecommitdiffstats
path: root/perl-install/install_steps.pm
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.org>2005-06-03 10:04:23 +0000
committerOlivier Blin <oblin@mandriva.org>2005-06-03 10:04:23 +0000
commit0e59ba8adaedee1fd083712147635e3db6399a1d (patch)
treea4a3d6b64b63bf2af46c5e04aaeaeb9ba23ae884 /perl-install/install_steps.pm
parentb0e91070fdb56f216fbf4d1c699bb78df8141544 (diff)
downloaddrakx-0e59ba8adaedee1fd083712147635e3db6399a1d.tar
drakx-0e59ba8adaedee1fd083712147635e3db6399a1d.tar.gz
drakx-0e59ba8adaedee1fd083712147635e3db6399a1d.tar.bz2
drakx-0e59ba8adaedee1fd083712147635e3db6399a1d.tar.xz
drakx-0e59ba8adaedee1fd083712147635e3db6399a1d.zip
introduce network_is_cheap(), use it, and fix a boolean typo
Diffstat (limited to 'perl-install/install_steps.pm')
-rw-r--r--perl-install/install_steps.pm9
1 files changed, 7 insertions, 2 deletions
diff --git a/perl-install/install_steps.pm b/perl-install/install_steps.pm
index 8c067be4e..4f345bd63 100644
--- a/perl-install/install_steps.pm
+++ b/perl-install/install_steps.pm
@@ -948,6 +948,11 @@ sub hasNetwork {
0;
}
+sub network_is_cheap {
+ my ($o) = @_;
+ member($o->{net}{type}, qw(adsl lan cable));
+}
+
#------------------------------------------------------------------------------
sub upNetwork {
my ($o, $b_pppAvoided) = @_;
@@ -955,7 +960,7 @@ sub upNetwork {
member($o->{method}, qw(ftp http nfs)) and return 1;
$o->{modules_conf}->write;
if (hasNetwork($o)) {
- if ($o->{net}{type} =~ /adsl|lan|cable/) {
+ if (network_is_cheap($o)) {
log::l("starting network ($o->{net}{type})");
require network::netconnect;
network::netconnect::start_internet($o);
@@ -985,7 +990,7 @@ sub downNetwork {
require network::netconnect;
network::netconnect::stop_internet($o);
return 1;
- } elsif (member($o->{net}{type}, qw(adsl lan cable))) {
+ } elsif (!network_is_cheap($o)) {
require network::netconnect;
network::netconnect::stop_internet($o);
run_program::rooted($o->{prefix}, "/etc/rc.d/init.d/syslog", "stop");