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
|
fi
|
||||||
|
|
||||||
if [ "$IS_OLD_HOME_DIR" = 1 ]; then
|
if [ "$IS_OLD_HOME_DIR" = 1 ]; then
|
||||||
for dir in /home/*; do
|
find /home/ -maxdepth 1 -type d -nouser | grep -q '^' && echo 'IS_OLD_HOME_DIR FAILED!'
|
||||||
stat -c "%n has owner %u resolved as %U" "$dir" | grep -v .bak | grep UNKNOWN | verbose
|
[ "${VERBOSE}" -eq 1 ] && find /home/ -maxdepth 1 -type d -nouser -exec stat -c "%n has owner %u resolved as %U" {} \;
|
||||||
if [[ ${PIPESTATUS[2]} == 0 ]]; then
|
|
||||||
# There is at least one dir matching
|
|
||||||
echo 'IS_OLD_HOME_DIR FAILED!'
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue