diff options
author | Till Kamppeter <tkamppeter@mandriva.com> | 2004-09-01 12:36:35 +0000 |
---|---|---|
committer | Till Kamppeter <tkamppeter@mandriva.com> | 2004-09-01 12:36:35 +0000 |
commit | 6391f72c64d4ea922ab3601ae801b14ecb529dac (patch) | |
tree | f483b0e6e93c77dd27c36ec220383320d54619f7 /perl-install/services.pm | |
parent | be3c90ab4cfe217b9ea525856dc53ca93f63cf83 (diff) | |
download | drakx-6391f72c64d4ea922ab3601ae801b14ecb529dac.tar drakx-6391f72c64d4ea922ab3601ae801b14ecb529dac.tar.gz drakx-6391f72c64d4ea922ab3601ae801b14ecb529dac.tar.bz2 drakx-6391f72c64d4ea922ab3601ae801b14ecb529dac.tar.xz drakx-6391f72c64d4ea922ab3601ae801b14ecb529dac.zip |
- Lete the function "start_not_running_service()" really start the specified service if it is not running instead of being a copy of the function "is_service_running()".
Diffstat (limited to 'perl-install/services.pm')
-rw-r--r-- | perl-install/services.pm | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/perl-install/services.pm b/perl-install/services.pm index 08afbd2c5..f3f565217 100644 --- a/perl-install/services.pm +++ b/perl-install/services.pm @@ -341,6 +341,10 @@ sub start_not_running_service ($) { # Exit silently if the service is not installed return 1 if !(-x "$::prefix/etc/rc.d/init.d/$service"); run_program::rooted($::prefix, "/etc/rc.d/init.d/$service", "status"); + if (($? >> 8) != 0) { + run_program::rooted($::prefix, + "/etc/rc.d/init.d/$service", "start"); + } return (($? >> 8) != 0) ? 0 : 1; } |