aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2007-04-30 09:06:17 +0000
committerRoy Marples <roy@marples.name>2007-04-30 09:06:17 +0000
commit4d283afe316aefcd003e6f870d3cf08ef1372790 (patch)
tree133b7f2ad6608b32da78c5e7095763a08fdeba24
parentabfd181ddecbe1ecc67acbcd36a885cc6bd2a06d (diff)
/etc/init.d/foo start and stop no longer exit when service is fully
started or stopped, #176452.
-rw-r--r--ChangeLog5
-rw-r--r--src/runscript.c14
2 files changed, 13 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index b0446d61..2100f056 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,11 @@
# ChangeLog for Gentoo System Intialization ("rc") scripts
# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPLv2
+ 30 Apr 2007; Roy Marples <uberlord@gentoo.org>:
+
+ /etc/init.d/foo start and stop no longer exit when service is fully
+ started or stopped, #176452.
+
27 Apr 2007; Roy Marples <uberlord@gentoo.org>:
env-update now respects COLON_SEPARATED and SPACE_SEPARATED env.d
diff --git a/src/runscript.c b/src/runscript.c
index c6f61181..e6cc2b56 100644
--- a/src/runscript.c
+++ b/src/runscript.c
@@ -557,9 +557,10 @@ static void svc_start (const char *service, bool deps)
background = true;
}
- if (rc_service_state (service, rc_service_started))
- ewarnx ("WARNING: %s has already been started", applet);
- else if (rc_service_state (service, rc_service_starting))
+ if (rc_service_state (service, rc_service_started)) {
+ ewarn ("WARNING: %s has already been started", applet);
+ return;
+ } else if (rc_service_state (service, rc_service_starting))
ewarnx ("WARNING: %s is already starting", applet);
else if (rc_service_state (service, rc_service_stopping))
ewarnx ("WARNING: %s is stopping", applet);
@@ -765,9 +766,10 @@ static void svc_stop (const char *service, bool deps)
! rc_service_state (service, rc_service_inactive))
exit (EXIT_FAILURE);
- if (rc_service_state (service, rc_service_stopped))
- ewarnx ("WARNING: %s is already stopped", applet);
- else if (rc_service_state (service, rc_service_stopping))
+ if (rc_service_state (service, rc_service_stopped)) {
+ ewarn ("WARNING: %s is already stopped", applet);
+ return;
+ } else if (rc_service_state (service, rc_service_stopping))
ewarnx ("WARNING: %s is already stopping", applet);
if (! rc_mark_service (service, rc_service_stopping))