Proposed guideline for init script files

John T. Guthrie guthrie at counterexample.org
Mon Mar 5 05:47:49 UTC 2007


On Tue, 2007-02-27 at 15:37 -0500, Jesse Keating wrote:
> The Packaging Committee has been discussing guidelines for init scripts for a 
> while.  Currently there is a split between init scripts being marked 
> as %config and many that aren't.  We (the PC) with input from various folks 
> feel it is best to not mark init scripts as %config, and instead promote 
> configuration to happen in an /etc/sysconfig/<init> file.  Mostly the reason 
> being that init scripts are just that, scripts to run and not config files to 
> edit.  As such I've drafted a proposal for the guidelines and the PC approved 
> it.  There is time now for a wider audience to review the proposed change and 
> comment.
> 
> Please take a moment to read through 
> http://fedoraproject.org/wiki/PackagingDrafts/InitScripts and provide some 
> feedback.  If nobody has major objections or reasonable adjustments, this 
> will become policy in a week's time.

I apologize for the slightly late reply.  I've been trying to get caught
up on email.

I do like this idea with two provisos:

1) That a recommendation be put in about each init script needs to
include an OPTIONS or PROGOPTS or similar variable on its command-line.
This allows customization through addition of command-line arguments.

2) That initscripts be discouraged from putting command-line arguments
directly in the scripts.  Instead they should be placed in the variable
from part 1) in /etc/sysconfig/progname.  Putting command-line arguments
directly into the init script means that I can't remove those arguments
without modifying the init script.  There could be some exceptions to
this guideline.  An example would be something to set the uid of the
program in question, such as adding "-u named" in the script to start
named.

To my current memory, these two situations cover every time that I have
needed to modify an init script.  (There might be others I can't think
of, though.)

-- 
John Guthrie
guthrie at counterexample.org




More information about the Fedora-maintainers mailing list