From dc4c8f7421af75a9fb092b84ef63cb1d70de70ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20M=C3=BCller?= Date: Wed, 3 Oct 2018 10:44:23 +0200 Subject: [PATCH] card-helpers.inc: rework EnsureUnmount MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Andreas Müller --- scripts/include/card-helpers.inc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/include/card-helpers.inc b/scripts/include/card-helpers.inc index 5c6d8eb..4d82c2d 100644 --- a/scripts/include/card-helpers.inc +++ b/scripts/include/card-helpers.inc @@ -161,9 +161,9 @@ EnsureUnmount() { # check if the card is currently mounted MOUNTSTR=$(mount | grep $1) if [ -n "$MOUNTSTR" ] ; then - echo -e "\n$1 is mounted. Unmounting..." - umount -f ${1}?* - echo "${style_green}Unmount done${style_normal}" + echo -e "${style_magenta}Unmount all partitions of $1...${style_normal}" + umount -f ${1}?* 2>/dev/null + echo "${style_green}Unmount done.${style_normal}" fi }