From 048e03377f2c99656dc0547892fcb8298d0d1089 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Mon, 15 Jun 2009 15:50:36 +0000 Subject: [PATCH] * Don't try to run fsck on ISO-9660/UDF filesystems. svn path=/nixos/branches/modular-nixos/; revision=15963 --- default.nix | 2 ++ modules/system/boot/stage-1-init.sh | 7 ++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/default.nix b/default.nix index d628a3a5231..3c174ca13e5 100644 --- a/default.nix +++ b/default.nix @@ -10,6 +10,8 @@ let in { + inherit config; + system = config.system.build.system; # The following are used by nixos-rebuild. diff --git a/modules/system/boot/stage-1-init.sh b/modules/system/boot/stage-1-init.sh index 8d062ac96c8..3f11da28950 100644 --- a/modules/system/boot/stage-1-init.sh +++ b/modules/system/boot/stage-1-init.sh @@ -141,13 +141,18 @@ checkFS() { # Only check block devices. if ! test -b "$device"; then return 0; fi + eval $(fstype "$device") + + # Don't check ROM filesystems. + if test "$FSTYPE" = iso9660 -o "$FSTYPE" = udf; then return 0; fi + # Don't run `fsck' if the machine is on battery power. !!! Is # this a good idea? if ! onACPower; then echo "on battery power, so no \`fsck' will be performed on \`$device'" return 0 fi - + FSTAB_FILE="/etc/mtab" fsck -V -v -C -a "$device" fsckResult=$?