Commit Graph

4 Commits

Author SHA1 Message Date
Michael Biebl
fc8847c12b systemctl: Tell update-rc.d to skip creating any systemd symlinks
When calling update-rc.d via systemd-sysv-install, tell it to skip
creating any systemd symlinks as we want to handle those directly in
systemctl. Older update-rc.d versions will ignore that request, but
that's ok. This means we don't need a versioned dependency against
init-system-helpers.

Closes: #743217
2018-11-18 23:24:28 +01:00
Dimitri John Ledkov
0a48138cc6 systemd-sysv-install: Fix name initialisation
Only initialise NAME after --root optional argument has been parsed, otherwise
NAME is initialized to e.g. `enable', instead of to the `unit-name`, resulting
in failures.

LP: #1752882
2018-03-05 14:04:30 +01:00
Martin Pitt
47b7d3278d Make systemd-sysv-install robust against existing $ROOT
Always initialize `$ROOT`, to avoid the script getting confused by an
existing outside env variable. Also fix the `--root` option to actually
work, the previous approach was conceptually broken due to how shell
quoting works.

Make the work with `set -u`.

Closes: #890436
2018-02-14 21:34:06 +01:00
Martin Pitt
b5aa768d81 Remove our update-rc.d patches, replace them with upstream patches
Upstream now calls a /lib/systemd/systemd-sysv-install abstraction. Provide one
for update-rc.d.

This also implements the "is-enabled" command by directly checking for the
presence of rcS or rc5 symlinks.

Closes: #760616
2015-05-29 08:45:03 +02:00