/etc/init.d/foo start and stop no longer exit when service is fully
started or stopped, #176452.
This commit is contained in:
parent
abfd181dde
commit
4d283afe31
@ -1,6 +1,11 @@
|
|||||||
# ChangeLog for Gentoo System Intialization ("rc") scripts
|
# ChangeLog for Gentoo System Intialization ("rc") scripts
|
||||||
# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPLv2
|
# 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>:
|
27 Apr 2007; Roy Marples <uberlord@gentoo.org>:
|
||||||
|
|
||||||
env-update now respects COLON_SEPARATED and SPACE_SEPARATED env.d
|
env-update now respects COLON_SEPARATED and SPACE_SEPARATED env.d
|
||||||
|
@ -557,9 +557,10 @@ static void svc_start (const char *service, bool deps)
|
|||||||
background = true;
|
background = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (rc_service_state (service, rc_service_started))
|
if (rc_service_state (service, rc_service_started)) {
|
||||||
ewarnx ("WARNING: %s has already been started", applet);
|
ewarn ("WARNING: %s has already been started", applet);
|
||||||
else if (rc_service_state (service, rc_service_starting))
|
return;
|
||||||
|
} else if (rc_service_state (service, rc_service_starting))
|
||||||
ewarnx ("WARNING: %s is already starting", applet);
|
ewarnx ("WARNING: %s is already starting", applet);
|
||||||
else if (rc_service_state (service, rc_service_stopping))
|
else if (rc_service_state (service, rc_service_stopping))
|
||||||
ewarnx ("WARNING: %s is stopping", applet);
|
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))
|
! rc_service_state (service, rc_service_inactive))
|
||||||
exit (EXIT_FAILURE);
|
exit (EXIT_FAILURE);
|
||||||
|
|
||||||
if (rc_service_state (service, rc_service_stopped))
|
if (rc_service_state (service, rc_service_stopped)) {
|
||||||
ewarnx ("WARNING: %s is already stopped", applet);
|
ewarn ("WARNING: %s is already stopped", applet);
|
||||||
else if (rc_service_state (service, rc_service_stopping))
|
return;
|
||||||
|
} else if (rc_service_state (service, rc_service_stopping))
|
||||||
ewarnx ("WARNING: %s is already stopping", applet);
|
ewarnx ("WARNING: %s is already stopping", applet);
|
||||||
|
|
||||||
if (! rc_mark_service (service, rc_service_stopping))
|
if (! rc_mark_service (service, rc_service_stopping))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user