aboutsummaryrefslogtreecommitdiff
path: root/rc.sysinit
diff options
context:
space:
mode:
authorLukas Fleischer <archlinux@cryptocrack.de>2012-01-29 02:52:34 (GMT)
committerLukas Fleischer <archlinux@cryptocrack.de>2012-01-30 23:20:35 (GMT)
commitf31bbefc876aadbd9eee3750a1a1a606a2053028 (patch)
tree88a5792c3538cdf6ceec7dbb7dfca8101f2b1149 /rc.sysinit
parentfe99dfb859174b7f0843b3a5793896811a66accb (diff)
downloadinitscripts-f31bbefc876aadbd9eee3750a1a1a606a2053028.tar.xz
Add fastboot support
This one adds support for the "/fastboot" file, as well as the "fastboot" kernel command line parameter. If either of them is specified, file system checks are skipped. The only exception is the existence of "/forcefsck" or the "forcefsck" kernel parameter which have precedence over fastboot. Implements FS#26154. Reported-by: Mark <mark@voidzero.net> Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
Diffstat (limited to 'rc.sysinit')
-rwxr-xr-xrc.sysinit27
1 files changed, 15 insertions, 12 deletions
diff --git a/rc.sysinit b/rc.sysinit
index b70ceaa..fbb1894 100755
--- a/rc.sysinit
+++ b/rc.sysinit
@@ -175,19 +175,22 @@ fi
# Check filesystems
[[ -f /forcefsck ]] || in_array forcefsck $(< /proc/cmdline) && FORCEFSCK="-- -f"
declare -r FORCEFSCK
-run_hook sysinit_prefsck
-if [[ -x $(type -P fsck) ]]; then
- stat_busy "Checking Filesystems"
- fsck_all >|"${FSCK_OUT:-/dev/stdout}" 2>|"${FSCK_ERR:-/dev/stdout}"
- declare -r fsckret=$?
- (( fsckret <= 1 )) && stat_done || stat_fail
-else
- declare -r fsckret=0
-fi
-run_hook sysinit_postfsck
-# Single-user login and/or automatic reboot if needed
-fsck_reboot $fsckret
+if [[ -n $FORCEFSCK ]] || { [[ ! -f /fastboot ]] && ! in_array fastboot $(< /proc/cmdline); }; then
+ run_hook sysinit_prefsck
+ if [[ -x $(type -P fsck) ]]; then
+ stat_busy "Checking Filesystems"
+ fsck_all >|"${FSCK_OUT:-/dev/stdout}" 2>|"${FSCK_ERR:-/dev/stdout}"
+ declare -r fsckret=$?
+ (( fsckret <= 1 )) && stat_done || stat_fail
+ else
+ declare -r fsckret=0
+ fi
+ run_hook sysinit_postfsck
+
+ # Single-user login and/or automatic reboot if needed
+ fsck_reboot $fsckret
+fi
status "Remounting Root" \
mount -o remount /