From b2e669e6c64584478572ee6c1f7342ff97e14619 Mon Sep 17 00:00:00 2001 From: Steve Langasek Date: Sat, 5 Jul 2008 14:52:07 -0700 Subject: [PATCH] Clarify what "sensible behaviour" is for init scripts Clarify that sensible behavior for start includes not starting another daemon and exiting successfully when the daemon is already running. Closes: #426877 --- policy.sgml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/policy.sgml b/policy.sgml index c9bd84f..24c9072 100644 --- a/policy.sgml +++ b/policy.sgml @@ -5944,11 +5944,13 @@ rmdir /usr/local/share/emacs 2>/dev/null || true

The init.d scripts must ensure that they will - behave sensibly if invoked with start when the - service is already running, or with stop when it - isn't, and that they don't kill unfortunately-named user - processes. The best way to achieve this is usually to use - start-stop-daemon. + behave sensibly (i.e., returning success and not starting + multiple copies of a service) if invoked with start + when the service is already running, or with stop + when it isn't, and that they don't kill unfortunately-named + user processes. The best way to achieve this is usually to + use start-stop-daemon with the --oknodo + option.

-- 2.39.2