Re: Proposed guideline for init script files

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 2007-03-05 at 00:47 -0500, John T. Guthrie wrote:
> 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.
> 
#2 isn't necessary as long as you can override an option
through /etc/sysconfig/progname.  For instance, if the program allows
options that come later on the commandline to override ones that come
earlier and the PROGOPTS variable is the last thing on the commandline.
However, it does make it simpler for maintainers and reviewers if the
rule is just to put them into the sysconfig file. (Else we'd have to
test every program whose initscript had options in the initscript just
in case... and there'd be a chance that major upstream rewrites would
change the behaviour.)

-Toshio

Attachment: signature.asc
Description: This is a digitally signed message part

--
Fedora-maintainers mailing list
Fedora-maintainers@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/fedora-maintainers
--
Fedora-maintainers-readonly mailing list
Fedora-maintainers-readonly@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/fedora-maintainers-readonly

[Index of Archives]     [Fedora Users]     [Fedora Development]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux