From 7b8be8e5349f29f7c95b3133eec5c51eb2257384 Mon Sep 17 00:00:00 2001 From: "Karlson2k (Evgeny Grin)" Date: Wed, 2 Sep 2020 15:49:40 +0300 Subject: [PATCH] initrd.scripts: fs_type_in_use() simplification Signed-off-by: Karlson2k (Evgeny Grin) --- defaults/initrd.scripts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/defaults/initrd.scripts b/defaults/initrd.scripts index 7a847556..1fe81fd3 100644 --- a/defaults/initrd.scripts +++ b/defaults/initrd.scripts @@ -1059,8 +1059,7 @@ run_shell() { } fs_type_in_use() { - fs_type=$1 - cut -d ' ' -f 3 < /proc/mounts | grep -Fq "${fs_type}" + grep -Eqse "^[^ ]+ [^ ]+ ${1} " /proc/mounts } mount_devfs() {