mirror of
https://gitlab.archlinux.org/tpowa/archboot.git
synced 2024-09-19 19:40:37 +02:00
allow more environments on machines with more than 5GB RAM in local mode
This commit is contained in:
parent
55d8f26a88
commit
14d1165acb
2 changed files with 5 additions and 5 deletions
|
@ -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 5920000 ]]; then
|
||||
if [[ -e "/.graphic_run" && "$(grep -w MemTotal /proc/meminfo | cut -d ':' -f2 | sed -e 's# ##g' -e 's#kB$##g')" -lt 4917000 ]]; 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[1m6GB 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[1m5GB 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
|
||||
|
|
|
@ -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 5920000 ]]; then
|
||||
if ! [[ -e "/.graphic_run" && "$(grep -w MemTotal /proc/meminfo | cut -d ':' -f2 | sed -e 's# ##g' -e 's#kB$##g')" -lt 4917000 ]]; 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 5920000 ]] && _cleanup_cache
|
||||
[[ "$(grep -w MemTotal /proc/meminfo | cut -d ':' -f2 | sed -e 's# ##g' -e 's#kB$##g')" -lt 4917000 ]] && _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 5920000 ]] && _cleanup_cache
|
||||
[[ "$(grep -w MemTotal /proc/meminfo | cut -d ':' -f2 | sed -e 's# ##g' -e 's#kB$##g')" -lt 4917000 ]] && _cleanup_cache
|
||||
rm -f /var/log/pacman.log
|
||||
done
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue