Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src PR/46756: Edgar Fu?: Enable ignoring subdirectories in daily...
details: https://anonhg.NetBSD.org/src/rev/fe442f096745
branches: trunk
changeset: 780583:fe442f096745
user: christos <christos%NetBSD.org@localhost>
date: Mon Jul 30 17:06:51 2012 +0000
description:
PR/46756: Edgar Fu?: Enable ignoring subdirectories in daily's find_core
diffstat:
etc/daily | 11 ++++++++++-
etc/defaults/daily.conf | 3 ++-
share/man/man5/daily.5 | 14 ++++++++++++--
3 files changed, 24 insertions(+), 4 deletions(-)
diffs (80 lines):
diff -r 90c2c4168791 -r fe442f096745 etc/daily
--- a/etc/daily Mon Jul 30 16:43:36 2012 +0000
+++ b/etc/daily Mon Jul 30 17:06:51 2012 +0000
@@ -1,6 +1,6 @@
#!/bin/sh -
#
-# $NetBSD: daily,v 1.81 2012/02/15 23:30:11 joerg Exp $
+# $NetBSD: daily,v 1.82 2012/07/30 17:06:51 christos Exp $
# @(#)daily 8.2 (Berkeley) 1/25/94
#
@@ -89,7 +89,16 @@
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 \
diff -r 90c2c4168791 -r fe442f096745 etc/defaults/daily.conf
--- a/etc/defaults/daily.conf Mon Jul 30 16:43:36 2012 +0000
+++ b/etc/defaults/daily.conf Mon Jul 30 17:06:51 2012 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: daily.conf,v 1.16 2012/02/07 19:13:30 joerg Exp $
+# $NetBSD: daily.conf,v 1.17 2012/07/30 17:06:51 christos 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
diff -r 90c2c4168791 -r fe442f096745 share/man/man5/daily.5
--- a/share/man/man5/daily.5 Mon Jul 30 16:43:36 2012 +0000
+++ b/share/man/man5/daily.5 Mon Jul 30 17:06:51 2012 +0000
@@ -1,4 +1,4 @@
-.\" $NetBSD: daily.5,v 1.4 2012/03/06 10:12:59 plunky Exp $
+.\" $NetBSD: daily.5,v 1.5 2012/07/30 17:06:51 christos 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 @@
.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
Home |
Main Index |
Thread Index |
Old Index