52 lines
2.2 KiB
Diff
52 lines
2.2 KiB
Diff
|
From 965c2d8760cd862eff1c0401db57cadb0e1b4eed Mon Sep 17 00:00:00 2001
|
||
|
From: =?UTF-8?q?Amadeusz=20=C5=BBo=C5=82nowski?= <aidecoe@aidecoe.name>
|
||
|
Date: Fri, 29 Jun 2012 13:58:21 +0200
|
||
|
Subject: [PATCH] 95rootfs-block: skip checks rel. to fsck if rd.skipfsck is
|
||
|
supplied
|
||
|
|
||
|
---
|
||
|
modules.d/95rootfs-block/mount-root.sh | 29 ++++++++++++++++-------------
|
||
|
1 file changed, 16 insertions(+), 13 deletions(-)
|
||
|
|
||
|
diff --git a/modules.d/95rootfs-block/mount-root.sh b/modules.d/95rootfs-block/mount-root.sh
|
||
|
index 9109638..19f59fa 100755
|
||
|
--- a/modules.d/95rootfs-block/mount-root.sh
|
||
|
+++ b/modules.d/95rootfs-block/mount-root.sh
|
||
|
@@ -54,20 +54,23 @@ mount_root() {
|
||
|
fsckoptions=$(cat "$NEWROOT"/fsckoptions)
|
||
|
fi
|
||
|
|
||
|
- if [ -f "$NEWROOT"/forcefsck ] || getargbool 0 forcefsck ; then
|
||
|
- fsckoptions="-f $fsckoptions"
|
||
|
- elif [ -f "$NEWROOT"/.autofsck ]; then
|
||
|
- [ -f "$NEWROOT"/etc/sysconfig/autofsck ] && . "$NEWROOT"/etc/sysconfig/autofsck
|
||
|
- if [ "$AUTOFSCK_DEF_CHECK" = "yes" ]; then
|
||
|
- AUTOFSCK_OPT="$AUTOFSCK_OPT -f"
|
||
|
- fi
|
||
|
- if [ -n "$AUTOFSCK_SINGLEUSER" ]; then
|
||
|
- warn "*** Warning -- the system did not shut down cleanly. "
|
||
|
- warn "*** Dropping you to a shell; the system will continue"
|
||
|
- warn "*** when you leave the shell."
|
||
|
- emergency_shell
|
||
|
+ if ! getargbool 0 rd.skipfsck; then
|
||
|
+ if [ -f "$NEWROOT"/forcefsck ] || getargbool 0 forcefsck ; then
|
||
|
+ fsckoptions="-f $fsckoptions"
|
||
|
+ elif [ -f "$NEWROOT"/.autofsck ]; then
|
||
|
+ [ -f "$NEWROOT"/etc/sysconfig/autofsck ] && \
|
||
|
+ . "$NEWROOT"/etc/sysconfig/autofsck
|
||
|
+ if [ "$AUTOFSCK_DEF_CHECK" = "yes" ]; then
|
||
|
+ AUTOFSCK_OPT="$AUTOFSCK_OPT -f"
|
||
|
+ fi
|
||
|
+ if [ -n "$AUTOFSCK_SINGLEUSER" ]; then
|
||
|
+ warn "*** Warning -- the system did not shut down cleanly. "
|
||
|
+ warn "*** Dropping you to a shell; the system will continue"
|
||
|
+ warn "*** when you leave the shell."
|
||
|
+ emergency_shell
|
||
|
+ fi
|
||
|
+ fsckoptions="$AUTOFSCK_OPT $fsckoptions"
|
||
|
fi
|
||
|
- fsckoptions="$AUTOFSCK_OPT $fsckoptions"
|
||
|
fi
|
||
|
|
||
|
rootopts=
|