From 213fa07d6ebcc7010bd57fd5aa297eb6d045082b Mon Sep 17 00:00:00 2001 From: Knut Ahlers Date: Fri, 5 Feb 2021 00:11:33 +0100 Subject: [PATCH] Prevent breaking the 01-remove-tmpfiles.hook during the hook Signed-off-by: Knut Ahlers --- mkroots.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mkroots.sh b/mkroots.sh index 64e78b7..de3e872 100644 --- a/mkroots.sh +++ b/mkroots.sh @@ -40,7 +40,7 @@ arch-chroot ${tmpdir} pacman-key --init arch-chroot ${tmpdir} pacman-key --populate archlinux # Temporarily break the tmpfiles hook which causes every pacman operation to hang forever -sed -i 's!^Exec.*!Exec = /usr/bin/true!' ${tmpdir}/usr/share/libalpm/hooks/30-systemd-tmpfiles.hook +sed -i 's!^Exec = .*/systemd-hook tmpfiles$!Exec = /usr/bin/true!' ${tmpdir}/usr/share/libalpm/hooks/*.hook cat >${tmpdir}/usr/share/libalpm/hooks/01-remove-tmpfiles.hook <<-'EOF' [Trigger] @@ -52,7 +52,7 @@ cat >${tmpdir}/usr/share/libalpm/hooks/01-remove-tmpfiles.hook <<-'EOF' [Action] Description = Removing tmpfiles hook... When = PostTransaction - Exec = /usr/bin/bash -exc "/usr/bin/sed -i 's!^Exec = .*/systemd-hook tmpfiles!Exec = /usr/bin/true!' /usr/share/libalpm/hooks/*.hook" + Exec = /usr/bin/bash -exc "/usr/bin/sed -i 's!^Exec = .*/systemd-hook tmpfiles$!Exec = /usr/bin/true!' /usr/share/libalpm/hooks/*.hook" EOF # Pack rootfs