mirror of
https://gitlab.archlinux.org/tpowa/archboot.git
synced 2024-09-20 12:00:37 +02:00
run switch_root only on tty1
This commit is contained in:
parent
af11cc4755
commit
e84b74f885
1 changed files with 12 additions and 13 deletions
|
@ -70,7 +70,7 @@ if [[ "${TTY}" = "tty1" ]]; then
|
||||||
rm -f /sysroot/{VERSION,config,buildconfig,init} &>/dev/null
|
rm -f /sysroot/{VERSION,config,buildconfig,init} &>/dev/null
|
||||||
# systemd needs this for root_switch
|
# systemd needs this for root_switch
|
||||||
touch /etc/initrd-release
|
touch /etc/initrd-release
|
||||||
_progress "100" "Systemd initrd-switch-root will be launched in a second..."
|
_progress "100" "System is ready."
|
||||||
read -r -t 2
|
read -r -t 2
|
||||||
printf "\ec"
|
printf "\ec"
|
||||||
# https://www.freedesktop.org/software/systemd/man/bootup.html
|
# https://www.freedesktop.org/software/systemd/man/bootup.html
|
||||||
|
@ -174,20 +174,19 @@ if ! [[ -e /.clean-pacman-db ]]; then
|
||||||
rm -rf /var/lib/pacman/local/"${i}"-[0-9]* &>/dev/null
|
rm -rf /var/lib/pacman/local/"${i}"-[0-9]* &>/dev/null
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
if [[ "${TTY}" = "/dev/tty1" ]] ; then
|
||||||
if ! mount | grep -q zram0; then
|
if ! mount | grep -q zram0; then
|
||||||
printf "\ec"
|
|
||||||
_TITLE="Archboot $(uname -m) | Basic Setup | Moving to ZRAM"
|
_TITLE="Archboot $(uname -m) | Basic Setup | Moving to ZRAM"
|
||||||
_switch_root_zram | _dialog --title "Initializing..." --gauge "Creating /dev/zram0 with zstd compression..." 6 75 0 | tee -a /dev/ttyS0 /dev/ttyAMA0 /dev/ttyUSB0 /dev/pts/0 2>/dev/null
|
_switch_root_zram | _dialog --title "Initializing..." --gauge "Creating /dev/zram0 with zstd compression..." 6 75 0 | tee -a /dev/ttyS0 /dev/ttyAMA0 /dev/ttyUSB0 /dev/pts/0 2>/dev/null
|
||||||
else
|
else
|
||||||
systemctl start systemd-networkd
|
systemctl start systemd-networkd
|
||||||
systemctl start systemd-resolved
|
systemctl start systemd-resolved
|
||||||
# initialize pacman keyring
|
# initialize pacman keyring
|
||||||
if [[ -e /etc/systemd/system/pacman-init.service ]]; then
|
if [[ -e /etc/systemd/system/pacman-init.service ]]; then
|
||||||
systemctl start pacman-init
|
systemctl start pacman-init
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -e /usr/bin/setup ]]; then
|
if [[ -e /usr/bin/setup ]]; then
|
||||||
_local_mode
|
_local_mode
|
||||||
# wait on user interaction!
|
# wait on user interaction!
|
||||||
|
|
Loading…
Reference in a new issue