From: Chris Koeritz Date: Sun, 7 Jan 2018 16:05:18 +0000 (-0500) Subject: cleaned up diagnostics X-Git-Tag: 2.140.107^2~2^2~8^2~2 X-Git-Url: https://feistymeow.org/gitweb/?p=feisty_meow.git;a=commitdiff_plain;h=19123a50615e90cdf4448bd97fe2b48c9d4ef3f5 cleaned up diagnostics --- diff --git a/scripts/site_avenger/revamp_cakelampvm.sh b/scripts/site_avenger/revamp_cakelampvm.sh index 62cb3a7b..3b1f3510 100644 --- a/scripts/site_avenger/revamp_cakelampvm.sh +++ b/scripts/site_avenger/revamp_cakelampvm.sh @@ -276,13 +276,17 @@ echo Successfully configured the apache2 environment variables needed for cakela sep +echo "Checking existing swap partition configuration." + # check for existing swap. free | grep -q "Swap:[[:blank:]]*[1-9][0-9]" if [ $? -ne 0 ]; then # no swap in current session, so add it. + echo "Enabling ramdisk swap partition... +" add_swap_mount - - echo "Enabled ramdisk swap partition for the current boot session." + echo " +Enabled ramdisk swap partition for current boot session." fi # the above just gives this session a swap partition, but we want to have @@ -293,6 +297,8 @@ fi crontab -l | grep -iq add_swap_mount if [ $? -ne 0 ]; then # no existing swap setup in crontab, so add it. + echo "Adding a boot-time ramdisk swap partition... +" # need to do it carefully, since sed won't add lines to a null file. we thus # create a temporary file to do our work in and ignore sed as a tool for this. tmpfile="$(mktemp junk.XXXXXX)" @@ -307,7 +313,8 @@ FEISTY_MEOW_APEX=${FEISTY_MEOW_APEX} crontab "$tmpfile" rm "$tmpfile" - echo "Added boot-time ramdisk swap partition to crontab for root." + echo " +Added boot-time ramdisk swap partition to crontab for root." fi ############## diff --git a/scripts/system/add_swap_mount.sh b/scripts/system/add_swap_mount.sh index 5ba4274e..608ffc5c 100644 --- a/scripts/system/add_swap_mount.sh +++ b/scripts/system/add_swap_mount.sh @@ -17,6 +17,7 @@ SWAP_SIZE="$1"; shift if [ "$SWAP_INSTANCE" == "--help" ]; then echo "\ +$(basename $0): This script will add a swap partition for Linux that uses hard drive space for swap memory. This increases the amount of available memory on RAM constrained systems. It accepts two parameters: (1) the instance of the swap file, which