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

Martin Pitt martin.pitt at ubuntu.com
Tue Jan 20 08:44:18 PST 2015

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.

Fix with corresponding test case attached. This is a test case for the
test suite I sent in my previous mail; that might still need some
masssaging, so if you are ok with this fix, I'll commit that without
the test case, and add the test case to the suite separately.


[1] http://cgit.freedesktop.org/systemd/systemd/commit/?id=b7e7184634d5
Martin Pitt                        | http://www.piware.de
Ubuntu Developer (www.ubuntu.com)  | Debian Developer  (www.debian.org)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-sysv-generator-Handle-.sh-suffixes-when-translating-.patch
Type: text/x-diff
Size: 4770 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20150120/dff36d88/attachment.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20150120/dff36d88/attachment.sig>

More information about the systemd-devel mailing list