From 8fe289cf5be90207efd638da0ba1b6f48c0e78e5 Mon Sep 17 00:00:00 2001 From: Michael Prokop Date: Thu, 13 Oct 2011 18:33:31 +0200 Subject: [PATCH 1/1] do not run fsck when deploying virtual machine When running filesystem check on the loopback device of the virtual machine we get something like: | fsck.ext3: No such file or directory while trying to open /dev/mapper/loop1p1 since the loopback device has been removed already. Since fsck shouldn't be necessary at all let's just skip it when building VMs. --- grml-debootstrap | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/grml-debootstrap b/grml-debootstrap index feb7aa1..3f14f75 100755 --- a/grml-debootstrap +++ b/grml-debootstrap @@ -1168,12 +1168,17 @@ umount_chroot() { # execute filesystem check {{{ fscktool() { - if [ "$FSCK" = 'yes' ] ; then - [ -n "$FSCKTOOL" ] || FSCKTOOL="fsck.${MKFS#mkfs.}" - einfo "Checking filesystem on $TARGET using $FSCKTOOL" - $FSCKTOOL $TARGET - eend $? - fi + if [ -n "$VIRTUAL" ] ; then + einfo "Skipping filesystem check since we deploy a virtual machine." + return 0 + fi + + if [ "$FSCK" = 'yes' ] ; then + [ -n "$FSCKTOOL" ] || FSCKTOOL="fsck.${MKFS#mkfs.}" + einfo "Checking filesystem on $TARGET using $FSCKTOOL" + $FSCKTOOL $TARGET + eend $? + fi } # }}} -- 2.1.4