From 57df0a8dd91c79fabe030b193358fd94dabdc7a4 Mon Sep 17 00:00:00 2001 From: the Sane <3657071+the-sane@users.noreply.github.com> Date: Wed, 2 Mar 2022 11:56:59 -0500 Subject: [PATCH] Look for swap in preflight check --- lug-helper.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/lug-helper.sh b/lug-helper.sh index 302f3a3..138b0ac 100755 --- a/lug-helper.sh +++ b/lug-helper.sh @@ -775,6 +775,15 @@ avx_check() { fi } +# Check if swap is set up +swap_check() { + if cat /proc/swaps | grep -vq "Filename"; then + preflight_pass+=("You have swap space configured.") + else + preflight_fail+=("You don't appear to have swap space configured.\nWe recommend swap for systems with 32 GB RAM or less.") + fi +} + # Check that the system is optimized for Star Citizen preflight_check() { # Initialize variables @@ -789,6 +798,7 @@ preflight_check() { # Call the optimization functions to perform the checks wine_check memory_check + swap_check avx_check mapcount_check filelimit_check