mirror of
https://gitlab.archlinux.org/tpowa/archboot.git
synced 2024-09-20 03:50:37 +02:00
only run switch_root on tty1
This commit is contained in:
parent
d5ffaa60ab
commit
a4707cda1d
1 changed files with 3 additions and 1 deletions
|
@ -26,7 +26,9 @@ _local_mode () {
|
|||
# fstrim <mountpoint> 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..."
|
||||
|
|
Loading…
Reference in a new issue