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

Thomas H.P. Andersen phomes at gmail.com
Fri May 30 06:28:40 PDT 2014


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

Move initscript parsing to a generator

Compared to the previous version this one includes a fix for initscripts that
have no start priority. I have also updated the commit messages. 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 | 899 ++++++++++++++++++++++++++++++++
 6 files changed, 921 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