Comment 4 for bug 259043

Revision history for this message
Dustin Kirkland  (kirkland) wrote :

Updated patch attached for sysvinit.

This patch:
 * Imports the "service" script functionality and manpage directly from the Fedora9 source, http://download.fedora.redhat.com/pub/fedora/linux/releases/9/Fedora/source/SRPMS/initscripts-8.76-1.src.rpm
  * Debian/Ubuntu changes include
   * service
    * Added header comments, with license/copyright in the shell script
    * Embedded a is_ignored_file() in the script; in the RH script, it was sourced from /etc/init.d/functions; we don't have/need that whole file. is_ignored_file() contains a more Debian/Ubuntu specific list of files to ignore. This list was taken from the sysvconfig version of the "service" script. There are probably some other scripts that could/should be added to this list over time.
    * Used INVOKERC="invoke-rc.d --force --quiet", rather than $SERVICEDIR/$SERVICE to execute the init script
    * Fixed one very minor bug in the RH version, which was using "-x" to test script execute-abilty in most places, but used a simpler "-f" test in one place; fixed this.
   * service.8
     * Removed the "See Also" links to non-existent (or not common) Debian/Ubuntu utilities (chkconfig, ntsysv).

I think this is a better implementation than:
 1) My previous version, which blindly just passed $@ to the init script, didn't use update-rc, didn't support --help, or --version, or --status-all, or --restart-all
 2) The sysvconfig version, which was a new implementation, which closely, but did not identically match the RH functionality
 3) The debian-helper-scripts version was was *very* primitive.

Requesting review and sponsorship/upload.

Followup patches will be posted to update debian-helper-scripts and sysvconfig to depend on sysvinit-utils.

:-Dustin