From a4707cda1de6a1c65ba3a89555436b205d5d98c9 Mon Sep 17 00:00:00 2001 From: Tobias Powalowski Date: Tue, 14 Feb 2023 09:09:55 +0100 Subject: [PATCH] only run switch_root on tty1 --- usr/lib/archboot/login.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/usr/lib/archboot/login.sh b/usr/lib/archboot/login.sh index 80c72f3e4..1e59fbcdd 100644 --- a/usr/lib/archboot/login.sh +++ b/usr/lib/archboot/login.sh @@ -26,7 +26,9 @@ _local_mode () { # fstrim for manual action # it needs some seconds to get RAM free on delete! _switch_root_zram() { -if ! [[ -e "/.switch_root" ]]; then +[[ -z $TTY ]] && TTY=$(tty) +TTY=${TTY#/dev/} +if ! [[ -e "/.switch_root" && "${TTY}" = "tty1" ]]; then touch /.switch_root clear echo -e "Moving \e[1mrootfs\e[m to btrfs on 4G \e[1m/dev/zram0\e[m. This needs some time..."