Module Name: src Committed By: martin Date: Wed Aug 8 14:26:50 UTC 2012
Modified Files: src/etc [netbsd-6]: daily src/etc/defaults [netbsd-6]: daily.conf src/share/man/man5 [netbsd-6]: daily.5 Log Message: Pull up following revision(s) (requested by christos in ticket #456): etc/daily: revision 1.82 etc/defaults/daily.conf: revision 1.17 share/man/man5/daily.5: revision 1.5 PR/46756: Edgar Fu�: Enable ignoring subdirectories in daily's find_core To generate a diff of this commit: cvs rdiff -u -r1.80.2.1 -r1.80.2.2 src/etc/daily cvs rdiff -u -r1.16 -r1.16.2.1 src/etc/defaults/daily.conf cvs rdiff -u -r1.3.6.1 -r1.3.6.2 src/share/man/man5/daily.5 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/etc/daily diff -u src/etc/daily:1.80.2.1 src/etc/daily:1.80.2.2 --- src/etc/daily:1.80.2.1 Thu Feb 16 19:56:43 2012 +++ src/etc/daily Wed Aug 8 14:26:49 2012 @@ -1,6 +1,6 @@ #!/bin/sh - # -# $NetBSD: daily,v 1.80.2.1 2012/02/16 19:56:43 riz Exp $ +# $NetBSD: daily,v 1.80.2.2 2012/08/08 14:26:49 martin Exp $ # @(#)daily 8.2 (Berkeley) 1/25/94 # @@ -89,7 +89,16 @@ if checkyesno find_core; then ignfstypes="$(echo $find_core_ignore_fstypes | \ sed -e's/\(!*\)\([^[:space:]]\{1,\}\)/-o \1 -fstype \2/g' \ -e's/^-o //')" + # Turn "foo bar" into "( -path foo -o -path bar ) -prune -o" + # Set ignpaths empty if no find_core_ignore_paths given + if [ -n "$find_core_ignore_paths" ]; then + ignpaths="$(printf " -o -path %s" $find_core_ignore_paths)" + ignpaths="( ${ignpaths# -o } ) -prune -o" + else + ignpaths="" + fi find / \( $ignfstypes \) -prune -o \ + ${ignpaths} \ -name 'lost+found' -prune -o \ \( -name '*.core' -o -name 'core' \) -type f -print > $TMP # \( -name '[#,]*' -o -name '.#*' -o -name a.out \ Index: src/etc/defaults/daily.conf diff -u src/etc/defaults/daily.conf:1.16 src/etc/defaults/daily.conf:1.16.2.1 --- src/etc/defaults/daily.conf:1.16 Tue Feb 7 19:13:30 2012 +++ src/etc/defaults/daily.conf Wed Aug 8 14:26:49 2012 @@ -1,4 +1,4 @@ -# $NetBSD: daily.conf,v 1.16 2012/02/07 19:13:30 joerg Exp $ +# $NetBSD: daily.conf,v 1.16.2.1 2012/08/08 14:26:49 martin Exp $ # # /etc/defaults/daily.conf -- # default configuration of /etc/daily.conf @@ -11,6 +11,7 @@ find_core=YES find_core_ignore_fstypes="!local rdonly fdesc null kernfs procfs ptyfs" +find_core_ignore_paths="" expire_news=NO purge_accounting=YES run_msgs=YES Index: src/share/man/man5/daily.5 diff -u src/share/man/man5/daily.5:1.3.6.1 src/share/man/man5/daily.5:1.3.6.2 --- src/share/man/man5/daily.5:1.3.6.1 Thu Mar 8 17:51:39 2012 +++ src/share/man/man5/daily.5 Wed Aug 8 14:26:49 2012 @@ -1,4 +1,4 @@ -.\" $NetBSD: daily.5,v 1.3.6.1 2012/03/08 17:51:39 riz Exp $ +.\" $NetBSD: daily.5,v 1.3.6.2 2012/08/08 14:26:49 martin Exp $ .\" .\" Copyright (c) 1996 Matthew R. Green .\" All rights reserved. @@ -24,7 +24,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd March 6, 2012 +.Dd July 30, 2012 .Dt DAILY 5 .Os .Sh NAME @@ -168,6 +168,16 @@ will ignore .Ql procfs type filesystems and filesystems that are not .Ql local . +.It Sy find_core_ignore_paths +Lists paths to ignore during the +.Sy find_core +phase. +For example, +.Ql /export +will not descend into any directories under the +.Ql /export +hierarchy. This, on a file server, allows to skip +user data while still scanning system files. .It Sy run_fsck_flags Extra options to be passed to .Xr fsck 8