[Mageia-dev] [soft-commits] [4244] services: Do not rely on /var/lock/subsys/ $service to determin if a service is running or not.

Thierry Vignaud thierry.vignaud at gmail.com
Wed Apr 25 10:03:19 CEST 2012


On 24 April 2012 22:10,  <root at mageia.org> wrote:
> services: Do not rely on /var/lock/subsys/$service to determin if a service
> is running or not.

BTW we should make is_service_running more robust by handling services
where status isn't implemented...

> Modified: drakx/trunk/perl-install/services.pm
> ===================================================================
> --- drakx/trunk/perl-install/services.pm	2012-04-24 20:10:33 UTC (rev 4243)
> +++ drakx/trunk/perl-install/services.pm	2012-04-24 20:10:35 UTC (rev 4244)
> @@ -239,7 +239,7 @@
>      };
>      my $update_service = sub {
>  	my ($service, $label) = @_;
> -	my $started = -e "/var/lock/subsys/$service";
> +	my $started = is_service_running($service);
>  	$label->set_label($started ? N("running") : N("stopped"));
>      };
>      my $b = Gtk2::EventBox->new;


More information about the Mageia-dev mailing list