logik verdreht
This commit is contained in:
parent
c7a2d7e128
commit
c882a6adea
1 changed files with 3 additions and 4 deletions
|
@ -13,7 +13,8 @@ crypt_mount()
|
||||||
local partitions=`dmsetup ls | grep -v "No devices found" | cut -f1`
|
local partitions=`dmsetup ls | grep -v "No devices found" | cut -f1`
|
||||||
for i in $partitions; do
|
for i in $partitions; do
|
||||||
if mount | grep -q "^/dev/mapper/$i$"
|
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
|
mount "/dev/mapper/$i" &>/dev/null || echo -e " (\"mount /dev/mapper/$i\" failed)" >&2
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
@ -25,9 +26,7 @@ crypt_umount()
|
||||||
local partitions=`dmsetup ls | grep -v "No devices found" | cut -f1`
|
local partitions=`dmsetup ls | grep -v "No devices found" | cut -f1`
|
||||||
for i in $partitions; do
|
for i in $partitions; do
|
||||||
if mount | grep -q "^/dev/mapper/$i$"
|
if mount | grep -q "^/dev/mapper/$i$"
|
||||||
then true
|
then echo -e "\t$i (unmounting)"
|
||||||
else
|
|
||||||
echo -e "\t$i (unmounting)"
|
|
||||||
umount "/dev/mapper/$i" &>/dev/null || echo -e " (\"umount /dev/mapper/$i\" failed)" >&2
|
umount "/dev/mapper/$i" &>/dev/null || echo -e " (\"umount /dev/mapper/$i\" failed)" >&2
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
Loading…
Reference in a new issue