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
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
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
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