diff --git a/usr/lib/archboot/update-installer.sh b/usr/lib/archboot/update-installer.sh index a344d7d6a..1b01431b2 100644 --- a/usr/lib/archboot/update-installer.sh +++ b/usr/lib/archboot/update-installer.sh @@ -19,17 +19,13 @@ usage () { echo -e "\033[1mUpdate installer, launch environments or create latest image files:\033[0m" echo -e "\033[1m-------------------------------------------------------------------\033[0m" echo -e "\033[1mPARAMETERS:\033[0m" + echo -e " \033[1m-h\033[0m This message." + echo -e "" echo -e " \033[1m-u\033[0m Update scripts: setup, quickinst, tz, km and helpers." echo -e "" - if [[ "$(grep -w MemTotal /proc/meminfo | cut -d ':' -f2 | sed -e 's# ##g' -e 's#kB$##g')" -gt 2000000 ]]; then - echo -e " \033[1m-latest\033[0m Launch latest archboot environment (using kexec)." - echo -e " This operation needs at least \033[1m2.0 GB RAM\033[0m." - echo "" - fi - if [[ "$(grep -w MemTotal /proc/meminfo | cut -d ':' -f2 | sed -e 's# ##g' -e 's#kB$##g')" -gt 3200000 ]]; then - echo -e " \033[1m-latest-install\033[0m Launch latest archboot environment with downloaded" - echo -e " package cache (using kexec)." - echo -e " This operation needs at least \033[1m3.2 GB RAM\033[0m." + if [[ "$(grep -w MemTotal /proc/meminfo | cut -d ':' -f2 | sed -e 's# ##g' -e 's#kB$##g')" -gt 2500000 ]]; then + echo -e " \033[1m-launch-xfce\033[0m Launch XFCE desktop with VNC sharing enabled." + echo -e " This operation needs at least \033[1m2.5 GB RAM\033[0m." echo "" fi if [[ "$(grep -w MemTotal /proc/meminfo | cut -d ':' -f2 | sed -e 's# ##g' -e 's#kB$##g')" -gt 3900000 ]]; then @@ -37,12 +33,26 @@ usage () { echo -e " This operation needs at least \033[1m3.9 GB RAM\033[0m." echo "" fi - if [[ "$(grep -w MemTotal /proc/meminfo | cut -d ':' -f2 | sed -e 's# ##g' -e 's#kB$##g')" -gt 2500000 ]]; then - echo -e " \033[1m-launch-xfce\033[0m Launch XFCE desktop with VNC sharing enabled." - echo -e " This operation needs at least \033[1m2.5 GB RAM\033[0m." + if [[ $(grep -w MemTotal /proc/meminfo | cut -d ':' -f2 | sed -e 's# ##g' -e 's#kB$##g') -lt 4400000 &&\ + $(grep -w MemTotal /proc/meminfo | cut -d ':' -f2 | sed -e 's# ##g' -e 's#kB$##g') -gt 4015000 ]]; then + echo -e "\033[1m\033[91mMemory check failed:\033[0m" + echo -e "\033[91m - Memory gap detected: \033[1m4.0G - 4.4G 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 add \033[1mmore\033[0m\033[93m or \033[1mless\033[0m\033[93m RAM to enable the missing \033[1mupdate\033[0m\033[93m options.\033[0m" echo "" + else + if [[ "$(grep -w MemTotal /proc/meminfo | cut -d ':' -f2 | sed -e 's# ##g' -e 's#kB$##g')" -gt 2000000 ]]; then + echo -e " \033[1m-latest\033[0m Launch latest archboot environment (using kexec)." + echo -e " This operation needs at least \033[1m2.0 GB RAM\033[0m." + echo "" + fi + if [[ "$(grep -w MemTotal /proc/meminfo | cut -d ':' -f2 | sed -e 's# ##g' -e 's#kB$##g')" -gt 3200000 ]]; then + echo -e " \033[1m-latest-install\033[0m Launch latest archboot environment with downloaded" + echo -e " package cache (using kexec)." + echo -e " This operation needs at least \033[1m3.2 GB RAM\033[0m." + echo "" + fi fi - echo -e " \033[1m-h\033[0m This message." exit 0 } diff --git a/usr/share/archboot/installer/etc/profile.d/launch-setup.sh b/usr/share/archboot/installer/etc/profile.d/launch-setup.sh index 48eb03214..ef5f18168 100644 --- a/usr/share/archboot/installer/etc/profile.d/launch-setup.sh +++ b/usr/share/archboot/installer/etc/profile.d/launch-setup.sh @@ -19,27 +19,27 @@ if [[ -e /usr/bin/setup ]]; then elif [[ "$(grep -w MemTotal /proc/meminfo | cut -d ':' -f2 | sed -e 's# ##g' -e 's#kB$##g')" -lt 3200000 ]]; then _welcome echo -e "\033[1m\033[91mMemory check failed:\033[0m" - echo -e "\033[1m\033[91m- Not engough memory detected! \033[0m" - echo -e "\033[1m\033[93m- Please add more than 3.2GB RAM.\033[0m" - echo -e "\033[1m\033[91mAborting ...\033[0m" + echo -e "\033[91m- Not engough memory detected! \033[0m" + echo -e "\033[93m- Please add \033[1mmore\033[0m\033[93m than \033[1m3.2GB\033[0m\033[93m RAM.\033[0m" + echo -e "\033[91mAborting ...\033[0m" _enter_shell elif [[ $(grep -w MemTotal /proc/meminfo | cut -d ':' -f2 | sed -e 's# ##g' -e 's#kB$##g') -lt 4400000 &&\ $(grep -w MemTotal /proc/meminfo | cut -d ':' -f2 | sed -e 's# ##g' -e 's#kB$##g') -gt 4015000 ]]; then _welcome echo -e "\033[1m\033[91mMemory check failed:\033[0m" - echo -e "\033[1m\033[91m- Memory gap detected (4.0G - 4.4G RAM)\033[0m" - echo -e "\033[1m\033[93m- Possibility of not working kexec boot.\033[0m" - echo -e "\033[1m\033[93m- Please use more or less RAM.\033[0m" - echo -e "\033[1m\033[91mAborting ...\033[0m" + echo -e "\033[91m- Memory gap detected: \033[1m4.0G - 4.4G 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" _enter_shell else [[ -z $TTY ]] && TTY=$(tty) TTY=${TTY#/dev/} cd / _welcome - echo -e "\033[1m\033[92mMemory checks finished successfully:\033[0m" - echo -e "\033[1m\033[93mGo and get a cup of coffee. Depending on your system setup,\033[0m" - echo -e "\033[1m\033[93myou can start with your tasks in about 5 minutes ...\033[0m" + echo -e "\033[1m\033[92mMemory checks run successfully:\033[0m" + echo -e "\033[93mGo and get a cup of coffee. Depending on your system setup,\033[0m" + echo -e "\033[93myou can \033[1mstart\033[0m\033[93m with your tasks in about \033[1m5\033[0m\033[93m minutes ...\033[0m" echo "" if [[ "${TTY}" == "tty1" ]]; then echo -e "\033[1m\033[91m10 seconds\033[0;25m time to hit \033[1m\033[92mCTRL-C\033[0m to \033[1m\033[91mstop\033[0m the process \033[1m\033[1mnow ...\033[0m"