forked from evolix/evocheck
Rewrite IS_OLD_HOME_DIR with find (fix output order in verbose mode)
This commit is contained in:
parent
6bfe6eb9a7
commit
671bdbd92b
10
evocheck.sh
10
evocheck.sh
|
@ -843,14 +843,8 @@ if [ -e /etc/debian_version ]; then
|
|||
fi
|
||||
|
||||
if [ "$IS_OLD_HOME_DIR" = 1 ]; then
|
||||
for dir in /home/*; do
|
||||
stat -c "%n has owner %u resolved as %U" "$dir" | grep -v .bak | grep UNKNOWN | verbose
|
||||
if [[ ${PIPESTATUS[2]} == 0 ]]; then
|
||||
# There is at least one dir matching
|
||||
echo 'IS_OLD_HOME_DIR FAILED!'
|
||||
break
|
||||
fi
|
||||
done
|
||||
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" {} \;
|
||||
fi
|
||||
fi
|
||||
|
||||
|
|
Loading…
Reference in a new issue