summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tvignaud@mandriva.org>2003-07-22 22:11:56 +0000
committerThierry Vignaud <tvignaud@mandriva.org>2003-07-22 22:11:56 +0000
commita46b8b21bfc990332a440d4f1fe727792143dc03 (patch)
tree9dd2a6e3a6d8afc478564e4ef52fe1ec6ec1c562
parentf7c71fd64ce30e0b5403814e0822a9e3fc405797 (diff)
downloaddrakx-backup-do-not-use-a46b8b21bfc990332a440d4f1fe727792143dc03.tar
drakx-backup-do-not-use-a46b8b21bfc990332a440d4f1fe727792143dc03.tar.gz
drakx-backup-do-not-use-a46b8b21bfc990332a440d4f1fe727792143dc03.tar.bz2
drakx-backup-do-not-use-a46b8b21bfc990332a440d4f1fe727792143dc03.tar.xz
drakx-backup-do-not-use-a46b8b21bfc990332a440d4f1fe727792143dc03.zip
disable service start/stop too in testing mode
-rwxr-xr-xperl-install/standalone/drakgw4
1 files changed, 3 insertions, 1 deletions
diff --git a/perl-install/standalone/drakgw b/perl-install/standalone/drakgw
index 0e11c0afb..c7829d073 100755
--- a/perl-install/standalone/drakgw
+++ b/perl-install/standalone/drakgw
@@ -69,6 +69,7 @@ sub outpend {
}
sub start_daemons () {
+ return if $::testing;
my $cups_used = 0;
log::explanations("Starting daemons");
if (-f "/etc/rc.d/init.d/cups") {
@@ -92,6 +93,7 @@ sub start_daemons () {
}
sub stop_daemons () {
+ return if $::testing;
log::explanations("Stopping daemons");
foreach (qw(dhcpd named)) {
system("/etc/rc.d/init.d/$_ status >/dev/null 2>/dev/null") == 0 and sys("/etc/rc.d/init.d/$_ stop");
@@ -376,7 +378,7 @@ my %rpm2file = ('dhcp-server' => '/usr/sbin/dhcpd',
#- first: try to install all in one step
my @needed_to_install = grep { !-e $rpm2file{$_} } keys %rpm2file;
-@needed_to_install and $in->do_pkgs->install(@needed_to_install);
+@needed_to_install and $in->do_pkgs->install(@needed_to_install) if !$::testing;
#- second: try one by one if failure detected
if (!$::testing && any { !-e $rpm2file{$_} } keys %rpm2file) {
foreach (keys %rpm2file) {