pentoo-livecd: X fails below 700MB ram, so put a warning in there and don't auto start X

This commit is contained in:
Rick Farina (Zero_Chaos) 2020-10-15 16:19:27 -04:00
parent 955265ab44
commit 60ca27b031
No known key found for this signature in database
GPG key ID: A29433C0AA431DDC
2 changed files with 8 additions and 2 deletions

View file

@ -55,7 +55,13 @@ if ! sudo grep -q "${changeuser}:!" /etc/shadow; then
else
printf "Something went wrong, aborting password set. Please report this issue\n"
fi
x_or_no
RAMSIZE=$(awk '/MemTotal/ {printf( "%.0f\n", int ( $2 / 1024 ) + 1)}' /proc/meminfo)
if [ "${RAMSIZE}" -gt "700" ]; then
x_or_no
else
printf "Your system doesn't have enough ram to run X properly. Please increase the amount of ram if possible.\n"
choose_x="n"
fi
if [ "${choose_x}" = "y" ]; then
printf "Remember to log in with user \"${changeuser}\" and the password you just set\n"
printf "*Press any key to start X securely.*\n"

View file

@ -37,7 +37,7 @@ src_install() {
#/usr/sbin
newsbin "${FILESDIR}"/flushchanges-2018.0 flushchanges
newsbin "${FILESDIR}"/makemo-2020.3 makemo
newsbin "${FILESDIR}"/livecd-setpass-r7 livecd-setpass
newsbin "${FILESDIR}"/livecd-setpass-r8 livecd-setpass
newinitd "${FILESDIR}"/binary-driver-handler.initd-2020.3-r1 binary-driver-handler