This new version exclude .bak and .date directories.
This commit is contained in:
parent
eeef28176e
commit
d1317eb087
17
evocheck.sh
17
evocheck.sh
|
@ -857,8 +857,21 @@ if [ -e /etc/debian_version ]; then
|
|||
fi
|
||||
|
||||
if [ "$IS_OLD_HOME_DIR" = 1 ]; then
|
||||
find /home/ -maxdepth 1 -type d -nouser | grep -q '^' && echo 'IS_OLD_HOME_DIR FAILED!'
|
||||
[ "${VERBOSE}" -eq 1 ] && find /home/ -maxdepth 1 -type d -nouser -exec stat -c "%n has owner %u resolved as %U" {} \;
|
||||
for dir in /home/*; do
|
||||
statResult=$(stat -c "%n has owner %u resolved as %U" "$dir" \
|
||||
| grep -Eve '.bak' -e '\.[0-9]{2}-[0-9]{2}-[0-9]{4}' \
|
||||
| grep UNKNOWN)
|
||||
# There is at least one dir matching
|
||||
if [[ -n "$statResult" ]]; then
|
||||
if [[ "$VERBOSE" == 1 ]]; then
|
||||
echo 'IS_OLD_HOME_DIR FAILED!'
|
||||
echo "$statResult"
|
||||
else
|
||||
echo 'IS_OLD_HOME_DIR FAILED!'
|
||||
break
|
||||
fi
|
||||
fi
|
||||
done
|
||||
fi
|
||||
fi
|
||||
|
||||
|
|
Loading…
Reference in a new issue