On Tue, 20.01.15 17:44, Martin Pitt (martin.p...@ubuntu.com) wrote:

> Hey all,
> 
> the recent fix for sysv-generator's Provides: handling [1] caused, or
> rather uncovered, another bug which now creates symlinks to itself
> "foo.service -> foo.service" for any /etc/init.d/foo.sh.
> 
> The generator would output an error message like
> 
>   Failed to create unit file <path...>/foo.service: File exists
> 
> instead of creating the actual foo.service file. I. e. this completely
> breaks translating init scripts with .sh.

Hmm, we already had code that checks this in place, didn#t we?

I mean sysv_translate_facility() already filters out the case where
the service name is identical to the provided name. Hence, why do you
need a second check for this?

I think your patch tapes over a bug somewhere else.

I wonder if the simple fix could just be to change this:

        } else if (filename && streq(name, filename))

to this

        } else if (filename && streq(n, filename))

Or so, in that function?

Lennart

-- 
Lennart Poettering, Red Hat
_______________________________________________
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel

Reply via email to