diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2011-11-06 13:58:48 -0600 |
---|---|---|
committer | William Hubbs <williamh@gentoo.org> | 2011-11-06 13:58:48 -0600 |
commit | e3b39a677b535bc2676a939519906f6b2dbce6f4 (patch) | |
tree | 0755a005b7d7247c21e5e92eb552757583aa0826 /init.d/fsck.in | |
parent | 27713e3a41574c20336fcbf4fd3522d126045f16 (diff) |
fsck: add the ability to specify mount points to check
Diffstat (limited to 'init.d/fsck.in')
-rw-r--r-- | init.d/fsck.in | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/init.d/fsck.in b/init.d/fsck.in index 54537f61..03b2939e 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.$$ |