dsa-update-unowned-file-status: avoid printing the apex of pruned directory trees.
authorTollef Fog Heen <tfheen@err.no>
Sun, 29 Nov 2015 03:51:30 +0000 (04:51 +0100)
committerTollef Fog Heen <tfheen@err.no>
Sun, 29 Nov 2015 03:51:30 +0000 (04:51 +0100)
dsa-nagios-checks/debian/changelog
dsa-nagios-checks/sbin/dsa-update-unowned-file-status

index 5f13718..680bb13 100644 (file)
@@ -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 <weasel@debian.org>  Fri, 11 Sep 2015 10:21:15 +0200
 
index e3caea2..65034a9 100755 (executable)
@@ -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"