Package: systemctl
Version: 1.4.4181-1.1
Severity: important

Dear Maintainer,

systemctl-replacement fails to support the preset parameter, which is used by
the deb-systemd-helper script when installing packages with systemd service
files. If the systemctl package is installed before a package, which wants to
install a systemd service file, enabling this service fails. If the systemctl
package is not installed, deb-systemd-helper itself takes care of enabling the
service file, if no systemd is installed on the system.

With installed systemctl package:

================================================================
# DEBIAN_FRONTEND=noninteractive apt-get install -y ntp

...

Setting up ntp (1:4.2.8p15+dfsg-1) ...
/usr/bin/deb-systemd-helper: error: systemctl preset failed on ntp.service: No 
such file or directory
invoke-rc.d: could not determine current runlevel
invoke-rc.d: policy-rc.d denied execution of start.
Setting up libgdbm-compat4:amd64 (1.19-2) ...
Setting up libperl5.32:amd64 (5.32.1-4+deb11u2) ...
Setting up perl (5.32.1-4+deb11u2) ...
Processing triggers for libc-bin (2.31-13+deb11u3) ...

# ls -l /etc/systemd/system/
default.target.wants/ timers.target.wants/

# ls -l /etc/systemd/system/*.wants

/etc/systemd/system/default.target.wants:
total 0
lrwxrwxrwx 1 root root 40 Jan  1  1970 e2scrub_reap.service -> 
/lib/systemd/system/e2scrub_reap.service

/etc/systemd/system/timers.target.wants:
total 0
lrwxrwxrwx 1 root root 43 Jan  1  1970 apt-daily-upgrade.timer -> 
/lib/systemd/system/apt-daily-upgrade.timer
lrwxrwxrwx 1 root root 35 Jan  1  1970 apt-daily.timer -> 
/lib/systemd/system/apt-daily.timer
lrwxrwxrwx 1 root root 37 Jan  1  1970 e2scrub_all.timer -> 
/lib/systemd/system/e2scrub_all.timer
lrwxrwxrwx 1 root root 32 Jan  1  1970 fstrim.timer -> 
/lib/systemd/system/fstrim.timer

# ls -l /lib/systemd/system/ntp.service
-rw-r--r-- 1 root root 354 Sep 23  2020 /lib/systemd/system/ntp.service
================================================================

Notice, that the error message "No such file or directory" is misleading and
wrong, see https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1009963.

Calling systemctl manually with the parameter set by deb-systemd-helper fails
too, 1 is returned as result and no links to the service files are setup.

================================================================
# systemctl --system --preset-mode=enable-only preset ntp.service
# echo $?
1
================================================================

Thanks,
Sascha

-- System Information:
Debian Release: 11.3
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable-security'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 5.4.0-107-generic (SMP w/4 CPU threads)
Locale: LANG=C, LC_CTYPE=C.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /bin/dash
Init: unable to detect

Versions of packages systemctl depends on:
ii  python3  3.9.2-3

Versions of packages systemctl recommends:
ii  procps  2:3.3.17-5

Versions of packages systemctl suggests:
pn  tini | dumb-init  <none>

-- no debconf information

Reply via email to