From dfaf77aa87d08278f9af30d01243f27336b60f57 Mon Sep 17 00:00:00 2001 From: Michael Prokop Date: Tue, 24 Aug 2021 10:14:21 +0200 Subject: [PATCH] GRMLBASE/15-initsetup: provide workaround for failing rsyslog Previous versions of the rsyslog package provided its rsyslog systemd unit file as /lib/systemd/system/rsyslog.service. Starting with rsyslog v8.2108.0-1, the file is provided as /usr/lib/systemd/system/rsyslog.service though. This change is related to the "dh_installsystemd: Prefer /usr/lib/systemd/ to /lib/systemd" change from debhelper v13.4, which furthermore seems to be related to the usrmerge situation. Now executing `systemctl preset-all` fails though: | # systemctl preset-all | [...] | Failed to preset unit, file /etc/systemd/system/syslog.service already exists and is a symlink to /lib/systemd/system/rsyslog.service. By manually removing the /etc/systemd/system/syslog.service symlink, the appropriate symlink (from /etc/systemd/system/syslog.service towards /usr/lib/systemd/system/rsyslog.service) gets set up as expected again. Reported towards Debian as #992847, but until it's fixed in the upstream packaging, we need a workaround in our build tools. --- etc/grml/fai/config/scripts/GRMLBASE/15-initsetup | 3 +++ 1 file changed, 3 insertions(+) diff --git a/etc/grml/fai/config/scripts/GRMLBASE/15-initsetup b/etc/grml/fai/config/scripts/GRMLBASE/15-initsetup index dd074ea..459e51a 100755 --- a/etc/grml/fai/config/scripts/GRMLBASE/15-initsetup +++ b/etc/grml/fai/config/scripts/GRMLBASE/15-initsetup @@ -23,6 +23,9 @@ systemd_setup() { $ROOTCMD systemctl set-default grml-boot.target || true ;; *) + # workaround for #992847 to workaround /lib/systemd -> /usr/lib/systemd transition + $ROOTCMD rm -f /etc/systemd/system/syslog.service + $ROOTCMD systemctl preset-all $ROOTCMD systemctl set-default grml-boot.target ;; -- 2.1.4