From 006032d073b04674662fcef0759cddba61568b52 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Graber?= Date: Fri, 28 Jun 2024 16:13:19 -0400 Subject: [PATCH] images: Make sure /run/systemd/system doesn't exist MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Stéphane Graber --- images/mint.yaml | 17 +++++++++++++++++ images/ubuntu.yaml | 17 +++++++++++++++++ 2 files changed, 34 insertions(+) diff --git a/images/mint.yaml b/images/mint.yaml index 399fd00e6..59b426bb8 100644 --- a/images/mint.yaml +++ b/images/mint.yaml @@ -383,6 +383,23 @@ packages: deb http://security.ubuntu.com/ubuntu {{ source.suite }}-security main restricted universe multiverse actions: +- trigger: post-unpack + action: |- + #!/bin/sh + set -eux + + # Make sure systemd doesn't think it's running. + rm -Rf /run/systemd/system + chattr +i /run/systemd + +- trigger: post-packages + action: |- + #!/bin/sh + set -eux + + # Remove the immutable flag. + chattr -i /run/systemd + - trigger: post-unpack action: |- #!/bin/sh diff --git a/images/ubuntu.yaml b/images/ubuntu.yaml index 26e433ba4..c6877ed90 100644 --- a/images/ubuntu.yaml +++ b/images/ubuntu.yaml @@ -637,6 +637,23 @@ packages: - riscv64 actions: +- trigger: post-unpack + action: |- + #!/bin/sh + set -eux + + # Make sure systemd doesn't think it's running. + rm -Rf /run/systemd/system + chattr +i /run/systemd + +- trigger: post-packages + action: |- + #!/bin/sh + set -eux + + # Remove the immutable flag. + chattr -i /run/systemd + - trigger: post-update action: |- #!/bin/sh