[systemd-devel] [PATCH] sysv-generator: Handle .sh suffixes when translating Provides:

Lennart Poettering lennart at poettering.net
Wed Jan 28 05:19:29 PST 2015


On Wed, 28.01.15 09:05, Martin Pitt (martin.pitt at ubuntu.com) wrote:

> Hey Lennart,
> 
> Lennart Poettering [2015-01-27 23:09 +0100]:
> > Hmm, we already had code that checks this in place, didn#t we?
> 
> We only previously had this .sh stripping in sysv_translate_name(),
> but that translates and init script name like "foo.sh" to
> "foo.service". But that's not what we need in
> sysv_translate_facility() to filter out the Provides: item which
> refers to itself.

I really don't follow. Why do we need the add_alias() equality check
now? I mean, if sysv_translate_facility() now detects if we translate
facilities listed in Provides: as pointing to the script itself, and
handles .sh properly, why do we need to check in add_alias() a second
time if we try to create a symlink to oursevlves?

The latter can go no, can't it?

Lennart

-- 
Lennart Poettering, Red Hat


More information about the systemd-devel mailing list