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