diff --git a/contrib/images/digitalocean/in_parts/100-image-check b/contrib/images/digitalocean/in_parts/100-image-check index bd7178132..a14bb87c1 100755 --- a/contrib/images/digitalocean/in_parts/100-image-check +++ b/contrib/images/digitalocean/in_parts/100-image-check @@ -136,7 +136,15 @@ function checkLogs { } function checkTMP { # Check the /tmp directory to ensure it is empty. Warn on any files found. - return 1 + if [[ -n "$(ls -A /tmp)" ]]; then + echo -en "\e[93m[WARN]\e[0m /tmp directory is not empty; Contents\n" + ls -A /tmp + ((WARN++)) + return 1 + fi + + echo -en "\e[32m[PASS]\e[0m /tmp directory is empty\n" + return 0 } function checkRoot { user="root" @@ -595,6 +603,9 @@ checkUsers echo -en "\n\nChecking the root account...\n" checkRoot +echo -en "\n\nChecking the /tmp directory...\n" +checkTMP + checkAgent # Summary