create empty nologin

This commit is contained in:
Tobias Powalowski 2023-06-18 17:29:03 +02:00
parent 191e54244f
commit 6e16fd3276
2 changed files with 7 additions and 0 deletions

View file

@ -57,6 +57,7 @@ if [[ "${TTY}" = "tty1" ]]; then
rm -f /sysroot/{VERSION,config,buildconfig,init} &>/dev/null
# systemd needs this for root_switch
touch /etc/initrd-release
touch /run/nologin
echo -e "\e[1;96mArchboot\e[m \e[1m- Arch Linux Environment finished.\e[m"
echo -e "\e[1mSystemd initrd-switch-root will be launched in a second...\e[m"
read -r -t 3
@ -128,6 +129,11 @@ _run_update_installer() {
fi
}
# systemd root switching can cause issues with pam nologin
if [[ -e "/run/nologin" ]]; then
systemctl restart systemd-user-sessions.service
fi
if ! [[ -e "/.vconsole-run" ]]; then
touch /.vconsole-run
FB_SIZE="$(cut -d 'x' -f 1 "$(find /sys -wholename '*fb0/modes')" | sed -e 's#.*:##g')"

View file

@ -388,6 +388,7 @@ _new_environment() {
rm -f /sysroot/{VERSION,config,buildconfig,init} &>/dev/null
# systemd needs this for root_switch
touch /etc/initrd-release
touch /run/nologin
systemctl start initrd-switch-root.target
fi
echo -e "\e[1mStep ${_S_APPEND}7/${_STEPS}:\e[m Creating initramfs ${_RAM}/${_INITRD}..."