[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:32:57 PST 2015
On Fri, 23.01.15 04:24, Michael Biebl (mbiebl at gmail.com) wrote:
> 2015-01-23 3:52 GMT+01:00 Cristian RodrÃguez <crrodriguez at opensuse.org>:
> > ---
> > 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
>
> If distros still ship such a rc.local sysv init script, shouldn't they
> rather symlink that to
> the native rc-local.service? Sounds like the better alternative to me.
> Or alternatively, mask that service.
>
> E.g in Debian we have /etc/init.d/rc.local and ship a
> /lib/systemd/system/rc.local.service -> rc-local.service
> symlink in the systemd package.
>
> > +#ifdef RC_LOCAL_SCRIPT_PATH_STOP
> > + if(streq(fpath, RC_LOCAL_SCRIPT_PATH_STOP))
> > + continue;
> > +#endif
>
> Same here. Besides, isn't that stop script supposed to be /sbin/halt.local?
> Debian doesn't have such a halt.local script, so I assume this is/was
> some Red Hat / SuSE specific extension?
I'd recommend not shipping the rc-local generator at all in Debian
then. It was simply compat for some crappy logic where Fedora was
executing two special scripts, that were not sysv during bootup and
shutdown.
Lennart
--
Lennart Poettering, Red Hat
More information about the systemd-devel
mailing list