130881Swosch#!/bin/sh - 230881Swosch# 350472Speter# $FreeBSD$ 461981Sbrian# 530881Swosch 661981Sbrian# If there is a global system configuration file, suck it in. 761981Sbrian# 861981Sbrianif [ -r /etc/defaults/periodic.conf ] 961981Sbrianthen 1061981Sbrian . /etc/defaults/periodic.conf 1161981Sbrian source_periodic_confs 1261981Sbrianfi 1330881Swosch 1461981Sbriancase "$weekly_noid_enable" in 1561981Sbrian [Yy][Ee][Ss]) 1661981Sbrian echo "" 1761981Sbrian echo "Check for files with an unknown user or group:" 1830881Swosch 1977517Sdougb rc=$(find -H ${weekly_noid_dirs:-/} \ 2077517Sdougb \( ! -fstype local -prune -or -name \* \) -and \ 2165843Sbrian \( -nogroup -o -nouser \) -print | sed 's/^/ /' | 2265843Sbrian tee /dev/stderr | wc -l) 2377517Sdougb [ $rc -gt 1 ] && rc=1 2477517Sdougb ;; 2565843Sbrian 2665843Sbrian *) rc=0;; 2761981Sbrianesac 2865843Sbrian 2965843Sbrianexit $rc 30