From c882a6adeacd2c9983bf228eb621974868e1ad97 Mon Sep 17 00:00:00 2001 From: lars Date: Mon, 13 Jun 2005 18:53:26 +0000 Subject: [PATCH] logik verdreht --- spielspass/dmcrypt-wrapper.sh | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/spielspass/dmcrypt-wrapper.sh b/spielspass/dmcrypt-wrapper.sh index d4484f9..7b18f94 100755 --- a/spielspass/dmcrypt-wrapper.sh +++ b/spielspass/dmcrypt-wrapper.sh @@ -13,7 +13,8 @@ crypt_mount() local partitions=`dmsetup ls | grep -v "No devices found" | cut -f1` for i in $partitions; do if mount | grep -q "^/dev/mapper/$i$" - then echo -e "\t$i (mounting)" + then true + else echo -e "\t$i (mounting)" mount "/dev/mapper/$i" &>/dev/null || echo -e " (\"mount /dev/mapper/$i\" failed)" >&2 fi done @@ -25,9 +26,7 @@ crypt_umount() local partitions=`dmsetup ls | grep -v "No devices found" | cut -f1` for i in $partitions; do if mount | grep -q "^/dev/mapper/$i$" - then true - else - echo -e "\t$i (unmounting)" + then echo -e "\t$i (unmounting)" umount "/dev/mapper/$i" &>/dev/null || echo -e " (\"umount /dev/mapper/$i\" failed)" >&2 fi done