Files
atap/ATAPAuditor/Helpers/ShellScripts/common/1.1.2.3.2.sh
T
2026-05-11 09:15:08 +02:00

19 lines
361 B
Bash

#!/usr/bin/env bash
directory="/home"
flag="nodev"
FSTAB_FILE="/etc/fstab"
if [[ ! -f "$FSTAB_FILE" ]]; then
echo "Error: $FSTAB_FILE does not exist."
exit 0
fi
if grep -q -E "^[^#]*[[:space:]]+$directory[[:space:]]+" "$FSTAB_FILE"; then
if grep -E "^[^#]*[[:space:]]+$directory[[:space:]]+" "$FSTAB_FILE" | grep -vq "$flag"; then
exit 1
fi
fi
exit 0