public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "William Hubbs" <williamh@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/openrc:master commit in: init.d/, conf.d/
Date: Wed, 23 Nov 2011 00:55:03 +0000 (UTC)	[thread overview]
Message-ID: <815952a65a9cf41d3d1f353e6bee5cef4de4805a.WilliamH@gentoo> (raw)

commit:     815952a65a9cf41d3d1f353e6bee5cef4de4805a
Author:     William Hubbs <williamh <AT> gentoo <DOT> org>
AuthorDate: Tue Nov 22 18:56:29 2011 +0000
Commit:     William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Tue Nov 22 18:56:29 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/openrc.git;a=commit;h=815952a6

Revert "Revert "fsck: add the ability to specify mount points to check""

This reverts commit 5a3599df8a15b1212857335101c9d31fb19e87e2.

After review, I am bringing this back to the tree.

---
 conf.d/fsck    |    7 +++++++
 init.d/fsck.in |   13 ++++++++++++-
 2 files changed, 19 insertions(+), 1 deletions(-)

diff --git a/conf.d/fsck b/conf.d/fsck
index 5d42c9d..16aa575 100644
--- a/conf.d/fsck
+++ b/conf.d/fsck
@@ -13,6 +13,13 @@
 #fsck_passno=">1"
 #fsck_passno="<2"
 
+# If passno is not enough granularity, you can also specify mountpoints to
+# check. This should NOT be used for the default non-multiplexed fsck, or your
+# system might not be checked. Additionally, it is mutually exclusive with
+# the fsck_passno setting.
+#fsck_mnt=""
+#fsck_mnt="/home"
+
 # Most modern fs's don't require a full fsck on boot, but for those that do
 # it may be advisable to skip this when running on battery.
 # WARNING: Do not turn this off if you have any JFS partitions.

diff --git a/init.d/fsck.in b/init.d/fsck.in
index 54537f6..03b2939 100644
--- a/init.d/fsck.in
+++ b/init.d/fsck.in
@@ -48,8 +48,13 @@ start()
 
 	if [ -n "$fsck_passno" ]; then
 		check_extra="[passno $fsck_passno] $check_extra"
+		if -n "$fsck_mnt" ]; then
+			eerror "Only 1 of fsck_passno and fsck_mnt must be set!"
+			return 1
+		fi
 	fi
 	ebegin "Checking local filesystems $check_extra"
+	# Append passno mounts
 	for p in $fsck_passno; do
 		local IFS="$_IFS"
 		case "$p" in
@@ -58,10 +63,16 @@ start()
 		set -- "$@" $(fstabinfo --passno "$p")
 		unset IFS
 	done
+	# Append custom mounts
+	for m in $fsck_mnt ; do
+		local IFS="$_IFS"
+		set -- "$@" "$m"
+		unset IFS
+	done
 
 	if [ "$RC_UNAME" = Linux ]; then
 		fsck_opts="$fsck_opts -C0 -T"
-		if [ -z "$fsck_passno" ]; then
+		if [ -z "$fsck_passno" -a -z "$fsck_mnt" ]; then
 			fsck_args=${fsck_args--A -p}
 			if echo 2>/dev/null >/.test.$$; then
 				rm -f /.test.$$



             reply	other threads:[~2011-11-23  0:55 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-23  0:55 William Hubbs [this message]
  -- strict thread matches above, loose matches on Subject: below --
2017-10-06 19:44 [gentoo-commits] proj/openrc:master commit in: init.d/, conf.d/ William Hubbs
2017-05-22 17:54 William Hubbs
2016-04-25 17:12 William Hubbs
2016-01-19 19:37 William Hubbs
2016-01-13 17:02 William Hubbs
2014-08-22 19:10 William Hubbs
2014-08-08 23:19 ` William Hubbs
2014-01-05 21:59 William Hubbs
2012-10-26  0:58 William Hubbs
2012-02-18 19:11 William Hubbs
2012-02-18 19:11 William Hubbs
2011-11-26 18:22 Mike Frysinger
2011-11-07  4:07 William Hubbs
2011-11-06 20:04 William Hubbs
2011-09-27 16:16 Christian Ruppert
2011-07-04  7:52 Robin H. Johnson
2011-06-24  2:58 William Hubbs

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=815952a65a9cf41d3d1f353e6bee5cef4de4805a.WilliamH@gentoo \
    --to=williamh@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox