[systemd-devel] [PATCH v4 0/2] Move initscript parsing to a generator

Thomas H.P. Andersen phomes at gmail.com
Sat May 31 14:29:34 PDT 2014


From: Thomas Hindoe Paaboel Andersen <phomes at gmail.com>

Compared to the previous version this one generates a .service file for
all initscripts in the sysvinit path that have execute permission. After
that it will adjust the before/after/wants/conflicts based on the rc.d's.

The patches have a few warts that I consider irrelevant but am willing to
fix if there is interest:

The following now unused sysv-specific info are dropped from service dump:
 * SysV Init Script has LSB Header: (yes/no)
 * SysVEnabled: (yes/no)
 * SysVRunLevels: (levels)

Note that this drops reading of chkconfig entirely. It also drops reading
runlevels from the LSB headers. The runlevels were only used to check for
runlevels outside of the normal 1-5 range and then add special dependencies
and settings. Special runlevels were dropped in the past so it seemed to be
unused code.

The generator does not know about non-generated units with a value set with
SysVStartPriority=. These are therefor not taken into account when converting
start priority to before/after. After the special runlevels were dropped I
don't see how this option adds any value.

Thomas Hindoe Paaboel Andersen (2):
  Move handling of sysv initscripts to a generator
  Remove sysv parser from service.c

 .gitignore                          |   1 +
 Makefile.am                         |  10 +
 src/core/service.c                  | 984 +-----------------------------------
 src/core/service.h                  |   5 -
 src/sysv-generator/Makefile         |   1 +
 src/sysv-generator/sysv-generator.c | 909 +++++++++++++++++++++++++++++++++
 6 files changed, 931 insertions(+), 979 deletions(-)
 create mode 100644 src/sysv-generator/Makefile
 create mode 100644 src/sysv-generator/sysv-generator.c

-- 
1.9.3



More information about the systemd-devel mailing list