From: Tollef Fog Heen Date: Sun, 29 Nov 2015 03:51:30 +0000 (+0100) Subject: dsa-update-unowned-file-status: avoid printing the apex of pruned directory trees. X-Git-Url: https://git.adam-barratt.org.uk/?a=commitdiff_plain;h=bc377570b95435a16ae94ccb8280937ecce4ed97;p=mirror%2Fdsa-nagios.git dsa-update-unowned-file-status: avoid printing the apex of pruned directory trees. --- diff --git a/dsa-nagios-checks/debian/changelog b/dsa-nagios-checks/debian/changelog index 5f13718..680bb13 100644 --- a/dsa-nagios-checks/debian/changelog +++ b/dsa-nagios-checks/debian/changelog @@ -16,6 +16,8 @@ dsa-nagios-checks (108+XXXX) UNRELEASED; urgency=medium [ Tollef Fog Heen ] * dsa-update-unowned-file-status: ignore fdescfs, used for /dev/fd on FreeBSD. + * dsa-update-unowned-file-status: avoid printing the apex of pruned + directory trees. -- Peter Palfrader Fri, 11 Sep 2015 10:21:15 +0200 diff --git a/dsa-nagios-checks/sbin/dsa-update-unowned-file-status b/dsa-nagios-checks/sbin/dsa-update-unowned-file-status index e3caea2..65034a9 100755 --- a/dsa-nagios-checks/sbin/dsa-update-unowned-file-status +++ b/dsa-nagios-checks/sbin/dsa-update-unowned-file-status @@ -31,7 +31,7 @@ if command -v ionice >/dev/null 2>&1; then prefix="ionice -c 3 -t" # idle priority, ignore errors fi -$prefix find / -ignore_readdir_race \( -fstype proc -o -fstype sysfs -o -fstype fdescfs \) -prune -o -nouser | head -n "$CUTOFF" > "$tmp" +$prefix find / -ignore_readdir_race \( -fstype proc -o -fstype sysfs -o -fstype fdescfs \) -prune -o \( -nouser -print \) | head -n "$CUTOFF" > "$tmp" if [ -s "$tmp" ]; then echo "WARN"