From 3ca2678698c660ed16c5ed5ff4bdd084c3bfe925 Mon Sep 17 00:00:00 2001 From: Tobias Powalowski Date: Sat, 11 Jun 2022 12:11:41 +0200 Subject: [PATCH] allow more environments on machines with more than 4.5GB RAM in local mode --- usr/bin/archboot-update-installer.sh | 4 ++-- usr/lib/archboot/login.sh | 4 ++-- usr/lib/archboot/update-installer.sh | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/usr/bin/archboot-update-installer.sh b/usr/bin/archboot-update-installer.sh index f7764a4c3..0e595c033 100755 --- a/usr/bin/archboot-update-installer.sh +++ b/usr/bin/archboot-update-installer.sh @@ -122,9 +122,9 @@ fi # Gnome, KDE/PLASMA or XFCE launch if [[ "${_L_XFCE}" == "1" || "${_L_PLASMA}" == "1" || "${_L_GNOME}" == "1" || "${_L_GNOME_WAYLAND}" == "1" || "${_L_PLASMA_WAYLAND}" == "1" ]]; then - if [[ -e "/.graphic_run" && "$(grep -w MemTotal /proc/meminfo | cut -d ':' -f2 | sed -e 's# ##g' -e 's#kB$##g')" -lt 4917000 ]]; then + if [[ -e "/.graphic_run" && "$(grep -w MemTotal /proc/meminfo | cut -d ':' -f2 | sed -e 's# ##g' -e 's#kB$##g')" -lt 4413000 ]]; then echo -e "\033[1m\033[91mError: Graphical environment already installed ...\033[0m" - echo -e "You are running in \033[1mLocal mode\033[0m with less than \033[1m5GB RAM\033[0m, which only can launch \033[1mone\033[0m environment." + echo -e "You are running in \033[1mLocal mode\033[0m with less than \033[1m4500 MB RAM\033[0m, which only can launch \033[1mone\033[0m environment." echo -e "Please relaunch your already used graphical environment from commandline." else if ! [[ -d /usr.zram ]]; then diff --git a/usr/lib/archboot/login.sh b/usr/lib/archboot/login.sh index 84b3b6558..31001f186 100644 --- a/usr/lib/archboot/login.sh +++ b/usr/lib/archboot/login.sh @@ -106,10 +106,10 @@ elif [[ "$(uname -m)" == "aarch64" && "$(grep -w MemTotal /proc/meminfo | cut -d echo -e "\033[91mAborting ...\033[0m" _enter_shell elif [[ "$(uname -m)" == "x86_64" && "$(grep -w MemTotal /proc/meminfo | cut -d ':' -f2 | sed -e 's# ##g' -e 's#kB$##g')" -gt 4670000 &&\ -"$(grep -w MemTotal /proc/meminfo | cut -d ':' -f2 | sed -e 's# ##g' -e 's#kB$##g')" -lt 5019000 ]]; then +"$(grep -w MemTotal /proc/meminfo | cut -d ':' -f2 | sed -e 's# ##g' -e 's#kB$##g')" -lt 5220000 ]]; then _welcome echo -e "\033[1m\033[91mMemory check failed:\033[0m" - echo -e "\033[91m- Kexec memory gap detected: \033[1m4750M - 5099M RAM\033[0m" + echo -e "\033[91m- Kexec memory gap detected: \033[1m4750M - 5299M RAM\033[0m" echo -e "\033[91m- Possibility of not working \033[1mkexec\033[0m\033[91m boot is given.\033[0m" echo -e "\033[93m- Please use \033[1mmore\033[0m\033[93m or \033[1mless\033[0m\033[93m RAM.\033[0m" echo -e "\033[91mAborting ...\033[0m" diff --git a/usr/lib/archboot/update-installer.sh b/usr/lib/archboot/update-installer.sh index 4dda208fc..f8306fc6a 100644 --- a/usr/lib/archboot/update-installer.sh +++ b/usr/lib/archboot/update-installer.sh @@ -40,7 +40,7 @@ usage () { # local image if [[ -e "/var/cache/pacman/pkg/archboot.db" ]]; then if [[ "$(grep -w MemTotal /proc/meminfo | cut -d ':' -f2 | sed -e 's# ##g' -e 's#kB$##g')" -gt 3860000 ]] ; then - if ! [[ -e "/.graphic_run" && "$(grep -w MemTotal /proc/meminfo | cut -d ':' -f2 | sed -e 's# ##g' -e 's#kB$##g')" -lt 4917000 ]]; then + if ! [[ -e "/.graphic_run" && "$(grep -w MemTotal /proc/meminfo | cut -d ':' -f2 | sed -e 's# ##g' -e 's#kB$##g')" -lt 4413000 ]]; then _graphic_options echo -e " \033[1m-xfce\033[0m Launch XFCE desktop with VNC sharing enabled." echo "" @@ -323,7 +323,7 @@ _prepare_graphic() { #shellcheck disable=SC2086 pacman -S ${i} --config ${_PACMAN_CONF} --noconfirm >/dev/null 2>&1 || exit 1 _cleanup_install - [[ "$(grep -w MemTotal /proc/meminfo | cut -d ':' -f2 | sed -e 's# ##g' -e 's#kB$##g')" -lt 4917000 ]] && _cleanup_cache + [[ "$(grep -w MemTotal /proc/meminfo | cut -d ':' -f2 | sed -e 's# ##g' -e 's#kB$##g')" -lt 4413000 ]] && _cleanup_cache rm -f /var/log/pacman.log done else @@ -342,7 +342,7 @@ _prepare_graphic() { #shellcheck disable=SC2086 pacman -S ${i} --noconfirm >/dev/null 2>&1 || exit 1 _cleanup_install - [[ "$(grep -w MemTotal /proc/meminfo | cut -d ':' -f2 | sed -e 's# ##g' -e 's#kB$##g')" -lt 4917000 ]] && _cleanup_cache + [[ "$(grep -w MemTotal /proc/meminfo | cut -d ':' -f2 | sed -e 's# ##g' -e 's#kB$##g')" -lt 4413000 ]] && _cleanup_cache rm -f /var/log/pacman.log done fi