diff --git a/usr/bin/archboot-update-installer.sh b/usr/bin/archboot-update-installer.sh index c6263be35..8a7fc9d63 100755 --- a/usr/bin/archboot-update-installer.sh +++ b/usr/bin/archboot-update-installer.sh @@ -9,7 +9,6 @@ . /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" @@ -41,7 +40,7 @@ _zram_initialize if [[ "${_L_COMPLETE}" == "1" || "${_L_INSTALL_COMPLETE}" == "1" ]]; then _update_installer_check touch /.update-installer - if ! [[ -e /etc/profile.d/zz-00-archboot ]]; then + if ! [[ -e /.archboot_container ]]; then echo -e "\033[1mStep 1/2:\033[0m Removing not necessary files from / ..." _clean_archboot echo -e "\033[1mStep 2/3:\033[0m Generating archboot container in ${_W_DIR} ..." @@ -49,10 +48,10 @@ if [[ "${_L_COMPLETE}" == "1" || "${_L_INSTALL_COMPLETE}" == "1" ]]; then _create_container || exit 1 cp -r /etc ${_W_DIR}/ cp /usr/bin/update-installer.sh ${_W_DIR}/usr/bin/ - echo "update-installer.sh ${_RUN_OPTION}" > ${_W_DIR}/etc/profile.d/zz-00-archboot.sh + touch ${_W_DIR}/.archboot_container 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 d39ec56a0..72ff61009 100644 --- a/usr/lib/archboot/update-installer.sh +++ b/usr/lib/archboot/update-installer.sh @@ -138,9 +138,10 @@ _zram_initialize() { if [[ "\$(tty)" == "$(tty)" ]]; then clear update-installer.sh ${_RUN_OPTION} - rm /etc/profile.d/zz-01-archboot.sh fi EOF + # motd not needed anymore + rm /etc/motd echo -e "\033[1mStep 5/7:\033[0m Copying initramfs to /new_root ..." echo -e " This takes some time ..." tar -C / --exclude="./dev/*" --exclude="./proc/*" --exclude="./sys/*" --exclude="./tmp/*" --exclude="./run/*"\