From d08e884c722e9633eceb46ae66e9ea388da4e20b Mon Sep 17 00:00:00 2001 From: Tobias Powalowski Date: Tue, 14 Feb 2023 15:04:56 +0100 Subject: [PATCH] cleanup mkinitcpio files from booted system --- usr/lib/archboot/login.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/usr/lib/archboot/login.sh b/usr/lib/archboot/login.sh index 7a722f0fd..1bb268d8b 100644 --- a/usr/lib/archboot/login.sh +++ b/usr/lib/archboot/login.sh @@ -44,6 +44,9 @@ if [[ "${TTY}" = "tty1" ]]; then rsync -aAXv --numeric-ids \ --exclude={"/dev/*","/proc/*","/sys/*","/tmp/*","/run/*","/mnt/*","/sysroot/*"} \ "/" "/sysroot" &>/dev/null + # cleanup mkinitcpio directories and files + rm -rf /sysroot/{hooks,install,kernel,new_root,sysroot} &>/dev/null + rm -f /sysroot/{VERSION,config,buildconfig,init} &>/dev/null # systemd needs this for root_switch touch /etc/initrd-release systemctl start initrd-switch-root