From 58df6d327c64d4342cc277dd0a82d60fcba4e771 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Mon, 4 Feb 2019 01:13:27 +0100 Subject: 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 --- scripts/functions | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'scripts') 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 -- cgit v1.2.3