summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOndrej Kozina <okozina@redhat.com>2017-10-11 10:20:38 +0200
committerOndrej Kozina <okozina@redhat.com>2017-10-11 14:39:15 +0200
commitc795a3b37f042d30bc706f73c67ff09c30addca6 (patch)
tree293f61f22c51e3398f00fb338f225e6a49d82fbf
parent74fd0dd6c49b1669a7e54b6c2fc9152c908fb2c6 (diff)
downloadlvm2-c795a3b37f042d30bc706f73c67ff09c30addca6.tar.gz
fsadm: fail 'check' explicitly on unsupported fs type
-rwxr-xr-xscripts/fsadm.sh7
1 files changed, 5 insertions, 2 deletions
diff --git a/scripts/fsadm.sh b/scripts/fsadm.sh
index e86d26667..6210eb22d 100755
--- a/scripts/fsadm.sh
+++ b/scripts/fsadm.sh
@@ -725,11 +725,14 @@ check() {
# Think about better way....
dry "$XFS_REPAIR" -n -o force_geometry "$VOLUME"
fi ;;
- *) # check if executed from interactive shell environment
+ "ext2"|"ext3"|"ext4"|"reiserfs")
+ # check if executed from interactive shell environment
case "$-" in
*i*) dry "$FSCK" $YES $FORCE "$VOLUME" ;;
*) dry "$FSCK" $FORCE -p "$VOLUME" ;;
- esac
+ esac ;;
+ *)
+ error "Filesystem \"$FSTYPE\" on device \"$VOLUME\" is not supported by this tool." ;;
esac
}