diff options
author | Martin Pitt <martin.pitt@ubuntu.com> | 2015-01-21 10:25:14 +0100 |
---|---|---|
committer | Martin Pitt <martin.pitt@ubuntu.com> | 2015-01-21 17:01:00 +0100 |
commit | 77354c7e6f096a447245a8781c1eaa4acbe67089 (patch) | |
tree | dc42596ea5bb9a7053b22aca78da4c083fb3b024 /src/journal/journal-internal.h | |
parent | d816e2b7909e50ee887e1a0a825db760cf6fd3b0 (diff) |
sysv-generator: Replace Provides: symlinks with real units
Since commit b7e7184 the SysV generator creates symlinks for all "Provides:" in
the LSB header. However, this is too greedy; there are cases where the
creation of a unit .service file fails because of an already existing
symlink with the same name:
- Backup files such as /etc/init.d/foo.bak still have "Provides: foo", and
thus get a foo.service -> foo.bak.service link. foo.bak would not be enabled
in rcN.d/, but we (deliberately) create units for all executables in init.d/
so that a manual "systemctl start" works. If foo.bak is processed before,
the symlink already exists.
- init.d/bar has "Provides: foo", while there also is a real init.d/foo. The
former would create a link foo.service -> bar.service, while the latter
would fail to create the real foo.service.
If we encounter an existing symlink, just remove it before writing a real unit.
Note that two init.d scripts "foo" and "bar" which both provide the same name
"common" already work. The first processed init script wins and creates the
"common.service" symlink, and the second just fails to create the symlink
again. Thus create an additional test case for this to ensure that it keeps
working sensibly.
https://bugs.debian.org/775404
Diffstat (limited to 'src/journal/journal-internal.h')
0 files changed, 0 insertions, 0 deletions