X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=dsa-nagios-checks%2Fsbin%2Fdsa-update-unowned-file-status;h=56331ef896a1712090a94f655a2ff059cf4f878a;hb=50add326e3f7c695788a0b25ef6332d6b6578bf5;hp=e3caea2f69a993949ea29095a01cc54db0a80b54;hpb=6fc39a31b3b783ed569c2fc7af8e2f03f81ae20b;p=mirror%2Fdsa-nagios.git diff --git a/dsa-nagios-checks/sbin/dsa-update-unowned-file-status b/dsa-nagios-checks/sbin/dsa-update-unowned-file-status index e3caea2..56331ef 100755 --- a/dsa-nagios-checks/sbin/dsa-update-unowned-file-status +++ b/dsa-nagios-checks/sbin/dsa-update-unowned-file-status @@ -22,7 +22,10 @@ # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. CUTOFF=40 -STATUS=/var/cache/dsa/nagios/nouser +STATUSDIR=/var/cache/dsa/nagios +STATUS="${STATUSDIR}"/nouser + +mkdir -p "${STATUSDIR}" tmp=`tempfile` trap "rm -f '$tmp'" exit @@ -31,7 +34,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 -o -fstype autofs -o -fstype nfs4 \) -prune -o \( -nouser -print \) | head -n "$CUTOFF" > "$tmp" if [ -s "$tmp" ]; then echo "WARN"