From 57f1de5cbf040001c6e224e6bf33152920d066fb Mon Sep 17 00:00:00 2001 From: Robert Nelson Date: Thu, 28 Mar 2013 11:47:35 -0500 Subject: [PATCH] use lsblk over mount when available Signed-off-by: Robert Nelson --- mk_mmc.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/mk_mmc.sh b/mk_mmc.sh index ed334c7..519ae9a 100755 --- a/mk_mmc.sh +++ b/mk_mmc.sh @@ -1376,8 +1376,13 @@ function check_mmc { echo "fdisk -l:" LC_ALL=C fdisk -l 2>/dev/null | grep "Disk /dev/" --color=never echo "" - echo "mount:" - mount | grep -v none | grep "/dev/" --color=never + if which lsblk > /dev/null ; then + echo "lsblk:" + lsblk | grep -v sr0 + else + echo "mount:" + mount | grep -v none | grep "/dev/" --color=never + fi echo "" read -p "Are you 100% sure, on selecting [${MMC}] (y/n)? " [ "${REPLY}" == "y" ] || exit