mirror of
https://gitlab.archlinux.org/tpowa/archboot.git
synced 2024-09-20 03:50:37 +02:00
add graphical environments only on systems with more than 4199MB RAM
This commit is contained in:
parent
d2cb67fa33
commit
04a91cddf1
3 changed files with 4 additions and 3 deletions
|
@ -165,7 +165,8 @@ _install_archboot() {
|
||||||
[[ "${_CLEANUP_CACHE}" == "1" ]] && _GRAPHICAL_PACKAGES=""
|
[[ "${_CLEANUP_CACHE}" == "1" ]] && _GRAPHICAL_PACKAGES=""
|
||||||
#shellcheck disable=SC2086
|
#shellcheck disable=SC2086
|
||||||
if grep -qw archboot /etc/hostname; then
|
if grep -qw archboot /etc/hostname; then
|
||||||
if [[ "$(grep -w MemTotal /proc/meminfo | cut -d ':' -f2 | sed -e 's# ##g' -e 's#kB$##g')" -gt 3860000 ]]; then
|
# 4200MB RAM are needed for graphic packages
|
||||||
|
if [[ "$(grep -w MemTotal /proc/meminfo | cut -d ':' -f2 | sed -e 's# ##g' -e 's#kB$##g')" -gt 4111000 ]]; then
|
||||||
_PACKAGES="${_ARCHBOOT} ${_GRAPHICAL_PACKAGES}"
|
_PACKAGES="${_ARCHBOOT} ${_GRAPHICAL_PACKAGES}"
|
||||||
else
|
else
|
||||||
_PACKAGES="${_ARCHBOOT}"
|
_PACKAGES="${_ARCHBOOT}"
|
||||||
|
|
|
@ -49,7 +49,7 @@ _run_update_installer() {
|
||||||
sleep 10
|
sleep 10
|
||||||
echo -e "\033[1mStarting\033[0m assembling of archboot environment with package cache ..."
|
echo -e "\033[1mStarting\033[0m assembling of archboot environment with package cache ..."
|
||||||
echo ""
|
echo ""
|
||||||
if [[ "$(grep -w MemTotal /proc/meminfo | cut -d ':' -f2 | sed -e 's# ##g' -e 's#kB$##g')" -gt 3860000 ]]; then
|
if [[ "$(grep -w MemTotal /proc/meminfo | cut -d ':' -f2 | sed -e 's# ##g' -e 's#kB$##g')" -gt 4111000 ]]; then
|
||||||
_run_latest_install
|
_run_latest_install
|
||||||
else
|
else
|
||||||
# local image
|
# local image
|
||||||
|
|
|
@ -39,7 +39,7 @@ usage () {
|
||||||
if [[ -e /usr/bin/setup ]]; then
|
if [[ -e /usr/bin/setup ]]; then
|
||||||
# local image
|
# local image
|
||||||
if [[ -e "/var/cache/pacman/pkg/archboot.db" ]]; then
|
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 [[ "$(grep -w MemTotal /proc/meminfo | cut -d ':' -f2 | sed -e 's# ##g' -e 's#kB$##g')" -gt 4111000 ]] ; then
|
||||||
# you can only install one environment with less RAM
|
# you can only install one environment with less RAM
|
||||||
if ! [[ -e "/.graphic_installed" && "$(grep -w MemTotal /proc/meminfo | cut -d ':' -f2 | sed -e 's# ##g' -e 's#kB$##g')" -lt 4413000 ]]; then
|
if ! [[ -e "/.graphic_installed" && "$(grep -w MemTotal /proc/meminfo | cut -d ':' -f2 | sed -e 's# ##g' -e 's#kB$##g')" -lt 4413000 ]]; then
|
||||||
_graphic_options
|
_graphic_options
|
||||||
|
|
Loading…
Reference in a new issue