diff --git a/wayblue-fix-89.sh b/wayblue-fix-89.sh index 1152a76..b798feb 100755 --- a/wayblue-fix-89.sh +++ b/wayblue-fix-89.sh @@ -27,12 +27,18 @@ set -e set -o pipefail -# For each file we're interested in +# Iterate over each file we're interested in for file in /etc/shadow /etc/gshadow; do + # Prelim check for zero-byte files (shouldn't proc) + if ! [ -s "$file" ]; then + echo "File is missing or empty: $file" + continue + fi # Prelim check to ensure we can read the file if ! [ -r "$file" ]; then echo "Unable to read file: $file" continue fi + # Prelim checks succeeded, move forward echo "Parsing $file for junk" done