[systemd-devel] [PATCH] [RFC] Move handling of sysv initscripts to a generator

Thomas H.P. Andersen phomes at gmail.com
Wed May 28 11:54:03 PDT 2014


On Wed, May 28, 2014 at 2:14 AM, Peeters Simon <peeters.simon at gmail.com> wrote:
> 2014-05-28 1:12 GMT+02:00 Thomas H.P. Andersen <phomes at gmail.com>:
>> From: Thomas Hindoe Paaboel Andersen <phomes at gmail.com>
>>
>> Reuses logic from service.c and the rc-local generator.
>>
>> 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.
>>
>> Also note that this code behaves differently to the old if an initcsript
>> and native unit exist with the same name. Before the initscript would be
>> ignored but now a .service file is created in /run which will override
>> the native unit.
>
> this feels wrong, the native unit should override the sysv one.
> Is there any reason why you want to change this?
> Couldn't you just use "arg_dest = argv[3];" instead?
Thanks. I have changed it to use this instead.

>> The old code dealing with initscripts are left in for now as the generator
>> will run first and the old code will then ignore the initscripts since
>> unit files exist for them. I will add another patch to rip the old code out
>> later.
>>
>> The patch is WIP and only tested lightly. I am mostly looking for comments
>> if this is a good idea at all.


More information about the systemd-devel mailing list