aboutsummaryrefslogtreecommitdiff
path: root/etc/periodic/weekly/340.noid
diff options
context:
space:
mode:
Diffstat (limited to 'etc/periodic/weekly/340.noid')
-rw-r--r--etc/periodic/weekly/340.noid10
1 files changed, 8 insertions, 2 deletions
diff --git a/etc/periodic/weekly/340.noid b/etc/periodic/weekly/340.noid
index 7ad71ea07f57..7b56f019a40e 100644
--- a/etc/periodic/weekly/340.noid
+++ b/etc/periodic/weekly/340.noid
@@ -16,6 +16,12 @@ case "$weekly_noid_enable" in
echo ""
echo "Check for files with an unknown user or group:"
- find -H ${weekly_noid_dirs:-/} -fstype local \
- \( -nogroup -o -nouser \) -print | sed 's/^/ /';;
+ rc=$(find -H ${weekly_noid_dirs:-/} -fstype local \
+ \( -nogroup -o -nouser \) -print | sed 's/^/ /' |
+ tee /dev/stderr | wc -l)
+ [ $rc -gt 1 ] && rc=1;;
+
+ *) rc=0;;
esac
+
+exit $rc