]> CyberLeo.Net >> Repos - FreeBSD/releng/10.0.git/blob - etc/periodic/weekly/340.noid
- Copy stable/10 (r259064) to releng/10.0 as part of the
[FreeBSD/releng/10.0.git] / etc / periodic / weekly / 340.noid
1 #!/bin/sh -
2 #
3 # $FreeBSD$
4 #
5
6 # If there is a global system configuration file, suck it in.
7 #
8 if [ -r /etc/defaults/periodic.conf ]
9 then
10     . /etc/defaults/periodic.conf
11     source_periodic_confs
12 fi
13
14 case "$weekly_noid_enable" in
15     [Yy][Ee][Ss])
16         echo ""
17         echo "Check for files with an unknown user or group:"
18
19         rc=$(find -H ${weekly_noid_dirs:-/} \
20             \( ! -fstype local -prune -or -name \* \) -and \
21             \( -nogroup -o -nouser \) -print | sed 's/^/  /' |
22             tee /dev/stderr | wc -l)
23         [ $rc -gt 1 ] && rc=1
24         ;;
25
26     *)  rc=0;;
27 esac
28
29 exit $rc