From 505f6951c404ddf96c6bbf7b9d768f589502b90f Mon Sep 17 00:00:00 2001 From: Roy Marples Date: Fri, 16 Nov 2007 11:55:08 +0000 Subject: If starting and started or stopping and stopped, just warn and continue. Fixes Gentoo bug #176452 again. --- src/runscript.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'src/runscript.c') diff --git a/src/runscript.c b/src/runscript.c index 7bdde764..c0a01999 100644 --- a/src/runscript.c +++ b/src/runscript.c @@ -598,9 +598,10 @@ static void svc_start (bool deps) background = true; } - if (state & RC_SERVICE_STARTED) - ewarnx ("WARNING: %s has already been started", applet); - else if (state & RC_SERVICE_STARTING) + if (state & RC_SERVICE_STARTED) { + ewarn ("WARNING: %s has already been started", applet); + return; + } else if (state & RC_SERVICE_STARTING) ewarnx ("WARNING: %s is already starting", applet); else if (state & RC_SERVICE_STOPPING) ewarnx ("WARNING: %s is stopping", applet); @@ -810,9 +811,10 @@ static void svc_stop (bool deps) ! (state & RC_SERVICE_INACTIVE)) exit (EXIT_FAILURE); - if (state & RC_SERVICE_STOPPED) - ewarnx ("WARNING: %s is already stopped", applet); - else if (state & RC_SERVICE_STOPPING) + if (state & RC_SERVICE_STOPPED) { + ewarn ("WARNING: %s is already stopped", applet); + return; + } else if (state & RC_SERVICE_STOPPING) ewarnx ("WARNING: %s is already stopping", applet); if (! rc_service_mark (service, RC_SERVICE_STOPPING)) -- cgit v1.2.3