[systemd-devel] [PATCH] sysv-generator: Do not generate units for files handled by rc-local generator

Lennart Poettering lennart at poettering.net
Fri Jan 23 05:31:10 PST 2015


On Thu, 22.01.15 23:52, Cristian Rodríguez (crrodriguez at opensuse.org) wrote:

> ---
>  src/sysv-generator/sysv-generator.c | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/src/sysv-generator/sysv-generator.c b/src/sysv-generator/sysv-generator.c
> index b8b77aa..d6e4dfa 100644
> --- a/src/sysv-generator/sysv-generator.c
> +++ b/src/sysv-generator/sysv-generator.c
> @@ -775,6 +775,14 @@ static int enumerate_sysv(LookupPaths lp, Hashmap *all_services) {
>                          fpath = strjoin(*path, "/", de->d_name, NULL);
>                          if (!fpath)
>                                  return log_oom();
> +#ifdef RC_LOCAL_SCRIPT_PATH_START
> +                        if(streq(fpath, RC_LOCAL_SCRIPT_PATH_START))
> +                            continue;
> +#endif
> +#ifdef RC_LOCAL_SCRIPT_PATH_STOP
> +                        if(streq(fpath, RC_LOCAL_SCRIPT_PATH_STOP))
> +                            continue;
> +#endif

Hmm? If you distro ships the rc local stuff as normal sysv init
script, then use that it as such, and consider dropping the rc-local
generator entirely from your distro.

The rc-local generator only exists to add compat support for those
systems where it never was a sysvinit script anyway...

The whole idea of rc.local is pretty crazy anyway, we certainly
shouldn't add more code for this anymore...

Lennart

-- 
Lennart Poettering, Red Hat


More information about the systemd-devel mailing list