From 1f728ec0afb3cd407a363e7200e250173dff284e Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Wed, 5 Feb 2025 01:36:58 +0000 Subject: [PATCH] autopkgtest: setup-host: clean out possibly-wrong /dev/log Signed-off-by: Ian Jackson --- adt/acommon | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/adt/acommon b/adt/acommon index bd863c3..6541b14 100644 --- a/adt/acommon +++ b/adt/acommon @@ -135,6 +135,16 @@ setup-host () { ! test -d /var/cache/apt/archives; then rm /var/cache/apt/archives fi + + # On systemd systems, /dev/log is a symlink into /run/systemd, + # but we cannot run systemd in the inner environment, + # so we use rsyslog. Clean out the symlink. + # + # The check for systemd is to let this test be less destructive + # when run under inadequate isolation on a non-systemd setup. + if ls -al /dev/log | grep systemd; then + rm -f /dev/log + fi ' : remove redundant packages -- 2.30.2