simplify vconsole call

This commit is contained in:
Tobias Powalowski 2022-11-28 14:53:18 +01:00
parent fb9fe95d9a
commit 8f415eeed6

View file

@ -88,8 +88,8 @@ _run_update_installer() {
fi
}
_vconsole
if [[ -e /usr/bin/setup ]]; then
_vconsole
_local_mode
_enter_shell
if ! [[ -e /tmp/.setup ]]; then
@ -97,7 +97,6 @@ if [[ -e /usr/bin/setup ]]; then
fi
# latest image, fail if less than 2GB RAM available
elif [[ "$(grep -w MemTotal /proc/meminfo | cut -d ':' -f2 | sed -e 's# ##g' -e 's#kB$##g')" -lt 1970000 ]]; then
_vconsole
_welcome
echo -e "\033[1m\033[91mMemory check failed:\033[0m"
echo -e "\033[91m- Not engough memory detected! \033[0m"
@ -107,7 +106,6 @@ elif [[ "$(grep -w MemTotal /proc/meminfo | cut -d ':' -f2 | sed -e 's# ##g' -e
# local image, fail if less than 3.3GB RAM available
elif [[ "$(grep -w MemTotal /proc/meminfo | cut -d ':' -f2 | sed -e 's# ##g' -e 's#kB$##g')" -lt 3277000 &&\
-e "/var/cache/pacman/pkg/archboot.db" ]]; then
_vconsole
_welcome
echo -e "\033[1m\033[91mMemory check failed:\033[0m"
echo -e "\033[91m- Not engough memory detected! \033[0m"
@ -116,7 +114,6 @@ elif [[ "$(grep -w MemTotal /proc/meminfo | cut -d ':' -f2 | sed -e 's# ##g' -e
_enter_shell
elif [[ "$(uname -m)" == "aarch64" && "$(grep -w MemTotal /proc/meminfo | cut -d ':' -f2 | sed -e 's# ##g' -e 's#kB$##g')" -gt 3860000 &&\
"$(grep -w MemTotal /proc/meminfo | cut -d ':' -f2 | sed -e 's# ##g' -e 's#kB$##g')" -lt 4210000 ]]; then
_vconsole
_welcome
echo -e "\033[1m\033[91mMemory check failed:\033[0m"
echo -e "\033[91m- Kexec memory gap detected: \033[1m3950M - 4.299M RAM\033[0m"
@ -125,7 +122,6 @@ elif [[ "$(uname -m)" == "aarch64" && "$(grep -w MemTotal /proc/meminfo | cut -d
echo -e "\033[91mAborting ...\033[0m"
_enter_shell
else
_vconsole
_welcome
_run_update_installer
fi