summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorBen Hutchings <ben@decadent.org.uk>2019-02-04 01:13:27 +0100
committerBen Hutchings <ben@decadent.org.uk>2019-02-04 02:30:03 +0100
commit58df6d327c64d4342cc277dd0a82d60fcba4e771 (patch)
tree52719f507fdad77e20c5f8296b5a414e99d0025f /scripts
parent9c6356429d56c83ec5057f975290291778a08760 (diff)
scripts/functions: Abort _checkfs_once early if fs type is unknown
Passing -t '' to fsck is not going to work, so print a meaningful warning instead. Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/functions4
1 files changed, 4 insertions, 0 deletions
diff --git a/scripts/functions b/scripts/functions
index 612f288..cb21468 100644
--- a/scripts/functions
+++ b/scripts/functions
@@ -351,6 +351,10 @@ _checkfs_once()
fi
FSCKCODE=0
+ if [ -z "${TYPE}" ]; then
+ log_warning_msg "Type of $NAME file system is unknown, so skipping check."
+ return
+ fi
if ! command -v fsck >/dev/null 2>&1; then
log_warning_msg "fsck not present, so skipping $NAME file system"
return