summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2007-11-16 11:55:08 +0000
committerRoy Marples <roy@marples.name>2007-11-16 11:55:08 +0000
commit505f6951c404ddf96c6bbf7b9d768f589502b90f (patch)
treed2e8bb1803437c079ba9ec8e3ac9a592f2dec578 /src
parent959219f2361038f3b4faa0c7fd04a8a9dd33b7eb (diff)
downloadopenrc-505f6951c404ddf96c6bbf7b9d768f589502b90f.tar.gz
openrc-505f6951c404ddf96c6bbf7b9d768f589502b90f.tar.bz2
openrc-505f6951c404ddf96c6bbf7b9d768f589502b90f.tar.xz
If starting and started or stopping and stopped, just warn and continue. Fixes Gentoo bug #176452 again.
Diffstat (limited to 'src')
-rw-r--r--src/runscript.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/runscript.c b/src/runscript.c
index 7bdde76..c0a0199 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))