From 56e24c07dd9bb13082843de7ec0719b54fcf5bf3 Mon Sep 17 00:00:00 2001 From: Tobias Powalowski Date: Thu, 2 Jun 2022 14:52:41 +0200 Subject: [PATCH] solve reboot --- usr/bin/archboot-update-installer.sh | 3 ++- usr/lib/archboot/update-installer.sh | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/usr/bin/archboot-update-installer.sh b/usr/bin/archboot-update-installer.sh index c2cb2556e..c6263be35 100755 --- a/usr/bin/archboot-update-installer.sh +++ b/usr/bin/archboot-update-installer.sh @@ -9,6 +9,7 @@ . /usr/lib/archboot/gnome-wayland.sh . /usr/lib/archboot/kde.sh . /usr/lib/archboot/kde-wayland.sh +_W_DIR="/archboot" [[ -z "${1}" ]] && usage _RUN_OPTION="$1" @@ -51,7 +52,7 @@ if [[ "${_L_COMPLETE}" == "1" || "${_L_INSTALL_COMPLETE}" == "1" ]]; then echo "update-installer.sh ${_RUN_OPTION}" > ${_W_DIR}/etc/profile.d/zz-00-archboot.sh systemctl stop dbus echo -e "\033[1mStep 3/3:\033[0m Switching to new root ${_W_DIR} ..." - mount -o bind ${_W_DIR} ${_W_DIR} + #mount -o bind ${_W_DIR} ${_W_DIR} systemctl switch-root ${_W_DIR} fi [[ ${_RUNNING_ARCH} == "x86_64" ]] && _kver_x86 diff --git a/usr/lib/archboot/update-installer.sh b/usr/lib/archboot/update-installer.sh index b5e4426cb..59534bc52 100644 --- a/usr/lib/archboot/update-installer.sh +++ b/usr/lib/archboot/update-installer.sh @@ -137,7 +137,8 @@ _zram_initialize() { cat << EOF > /etc/profile.d/zz-01-archboot.sh [[ -z \$TTY ]] && TTY=\$(tty) TTY=\${TTY#/dev/} -if [[ "\${TTY}" == "tty1" ]]; then +if [[ "\${TTY}" == "$(tty)" ]]; then + clear update-installer.sh ${_RUN_OPTION} rm /etc/profile.d/zz-01-archboot.sh fi