From Fedora Project Wiki

m (1 revision(s))
m (Fixed template)
Line 16: Line 16:
Although init files live in /etc, they are scripts to be executed, not configured.  Any configuration should be made available through /etc/sysconfig/<service> rather than in the init script itself.  A valid exception to this rule would be existing packages where configuration is still done via the init file.  In this case, the init file could be marked as %config following the rules from the [[Config|  Configuration files]]  section to preserve a users configuration upon upgrade, hopefully so that the user can migrate said configuration to a new /etc/sysconfig/<service> config file.
Although init files live in /etc, they are scripts to be executed, not configured.  Any configuration should be made available through /etc/sysconfig/<service> rather than in the init script itself.  A valid exception to this rule would be existing packages where configuration is still done via the init file.  In this case, the init file could be marked as %config following the rules from the [[Config|  Configuration files]]  section to preserve a users configuration upon upgrade, hopefully so that the user can migrate said configuration to a new /etc/sysconfig/<service> config file.


{{Template:Warning}} If an init script in an existing package is marked as a config file right now, you MUST factor the configurable part of the init script into a file underneath /etc/sysconfig. You MAY keep the init script marked as a configuration file until the release of F8test1 to allow users to migrate their configurations
{{Admon/warning | If an init script in an existing package is marked as a config file right now, you MUST factor the configurable part of the init script into a file underneath /etc/sysconfig. You MAY keep the init script marked as a configuration file until the release of F8test1 to allow users to migrate their configurations}}


Init scripts should also have 0755 permissions.
Init scripts should also have 0755 permissions.

Revision as of 18:31, 3 June 2008

InitScripts Proposal

Problem

There is confusion and disagreement over init files and whether or not they should be marked %config. Init scripts are files that live in /etc, however they are scripts to be executed not files to be configured.

Rationale

Init scripts should be written in such a way that any possible configuration needs to be done from a file in /etc/sysconfig/<package> rather than in the init file itself. Thus the init file should not be marked as %config.

Plan

Add the following to Packaging/Guidelines

Init Scripts

Init scripts must not be marked as %config files.

Although init files live in /etc, they are scripts to be executed, not configured. Any configuration should be made available through /etc/sysconfig/<service> rather than in the init script itself. A valid exception to this rule would be existing packages where configuration is still done via the init file. In this case, the init file could be marked as %config following the rules from the Configuration files section to preserve a users configuration upon upgrade, hopefully so that the user can migrate said configuration to a new /etc/sysconfig/<service> config file.

If an init script in an existing package is marked as a config file right now, you MUST factor the configurable part of the init script into a file underneath /etc/sysconfig. You MAY keep the init script marked as a configuration file until the release of F8test1 to allow users to migrate their configurations

Init scripts should also have 0755 permissions.