Run `fsck' when on AC power.
In practice, it should only run once in a while, and should help find inconsistencies or corruptions sooner. See https://mail.cs.uu.nl/pipermail/nix-dev/2009-February/001827.html for a discussion. svn path=/nixos/trunk/; revision=15577
This commit is contained in:
parent
018cb283f2
commit
52889b2323
|
@ -166,15 +166,6 @@ checkFS() {
|
|||
# Only check block devices.
|
||||
if ! test -b "$device"; then return 0; fi
|
||||
|
||||
# For unclean ext3 file systems, fsck.ext3 should just replay the
|
||||
# journal and exit, but in practice this takes *much* longer than
|
||||
# letting the kernel recover the FS. So, don't run fsck on
|
||||
# journalling file systems.
|
||||
eval $(fstype "$device")
|
||||
if test "$FSTYPE" = ext3 -o "$FSTYPE" = ext4 -o "$FSTYPE" = reiserfs -o "$FSTYPE" = xfs -o "$FSTYPE" = jfs; then
|
||||
return 0;
|
||||
fi
|
||||
|
||||
# Don't run `fsck' if the machine is on battery power. !!! Is
|
||||
# this a good idea?
|
||||
if ! onACPower; then
|
||||
|
|
Loading…
Reference in New Issue