Add a run_fsck_flags variable to daily.conf(5), allowing extra flags to trunk
authorbouyer <bouyer@NetBSD.org>
Sat, 30 Aug 2008 10:53:22 +0000
branchtrunk
changeset 172838 d3b7f51241b3
parent 172837 5198688e83e2
child 172839 8dba6b4f357e
Add a run_fsck_flags variable to daily.conf(5), allowing extra flags to be passed to to daily fsck run. For example, run_fsck_flags="-Tffs:-X" will run the nighly fsck_ffs on a snapshot :)
etc/daily
etc/defaults/daily.conf
share/man/man5/daily.conf.5
--- a/etc/daily	Sat Aug 30 10:49:27 2008 +0000
+++ b/etc/daily	Sat Aug 30 10:53:22 2008 +0000
@@ -1,6 +1,6 @@
 #!/bin/sh -
 #
-#	$NetBSD: daily,v 1.70 2007/06/06 13:30:47 martti Exp $
+#	$NetBSD: daily,v 1.71 2008/08/30 10:53:22 bouyer Exp $
 #	@(#)daily	8.2 (Berkeley) 1/25/94
 #
 
@@ -228,7 +228,7 @@
 if checkyesno run_fsck; then
 	echo ""
 	echo "Checking filesystems:"
-	fsck -n -f | grep -v '^\*\* Phase'
+	fsck -n -f ${run_fsck_flags} | grep -v '^\*\* Phase'
 fi
 
 echo ""
--- a/etc/defaults/daily.conf	Sat Aug 30 10:49:27 2008 +0000
+++ b/etc/defaults/daily.conf	Sat Aug 30 10:53:22 2008 +0000
@@ -1,4 +1,4 @@
-#	$NetBSD: daily.conf,v 1.10 2008/01/27 05:20:24 xtraeme Exp $
+#	$NetBSD: daily.conf,v 1.11 2008/08/30 10:53:22 bouyer Exp $
 #
 # /etc/defaults/daily.conf --
 #	default configuration of /etc/daily.conf
@@ -24,6 +24,7 @@
 check_network=YES
 full_netstat=NO
 run_fsck=NO
+run_fsck_flags=""
 run_rdist=YES
 run_security=YES
 run_skeyaudit=YES
--- a/share/man/man5/daily.conf.5	Sat Aug 30 10:49:27 2008 +0000
+++ b/share/man/man5/daily.conf.5	Sat Aug 30 10:53:22 2008 +0000
@@ -1,4 +1,4 @@
-.\"	$NetBSD: daily.conf.5,v 1.22 2008/05/29 14:51:25 mrg Exp $
+.\"	$NetBSD: daily.conf.5,v 1.23 2008/08/30 10:53:22 bouyer 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 January 27, 2008
+.Dd August 30, 2008
 .Dt DAILY.CONF 5
 .Os
 .Sh NAME
@@ -122,6 +122,10 @@
 with the
 .Fl n
 option.
+.It Sy run_fsck_flags
+extra options to be passed to
+.Xr fsck 8
+when run.
 .It Sy run_rdist
 This runs
 .Xr rdist 1