1114402Sru#!/bin/sh - 2114402Sru# 3114402Sru# $FreeBSD$ 4114402Sru# 5114402Sru 6114402Sru# If there is a global system configuration file, suck it in. 7114402Sru# 8114402Sruif [ -r /etc/defaults/periodic.conf ] 9114402Sruthen 10114402Sru . /etc/defaults/periodic.conf 11114402Sru source_periodic_confs 12114402Srufi 13114402Sru 14114402Srucase "$weekly_noid_enable" in 15114402Sru [Yy][Ee][Ss]) 16114402Sru echo "" 17114402Sru echo "Check for files with an unknown user or group:" 18114402Sru 19114402Sru rc=$(find -H ${weekly_noid_dirs:-/} \ 20114402Sru \( ! -fstype local -prune -or -name \* \) -and \ 21114402Sru \( -nogroup -o -nouser \) -print | sed 's/^/ /' | 22114402Sru tee /dev/stderr | wc -l) 23114402Sru [ $rc -gt 1 ] && rc=1 24114402Sru ;; 25114402Sru 26114402Sru *) rc=0;; 27114402Sruesac 28114402Sru 29114402Sruexit $rc 30114402Sru