dm_path_=`echo $dm_path_ |awk '{print $1}'` || die "could not get devicemapper name for $tmp_"
dprint "dm_path_=\"$dm_path_\""
+ # check for symlinks
+ unset tmp_dm_path_
+ for dmapper in /dev/mapper/grml-crypt* ; do
+ link=$(readlink -f "$dmapper")
+ dprint "looping device mapper devices, dmapper=$dmapper => link=$link"
+ if [ "$link" = "$dm_path_" ] ; then
+ tmp_dm_path_="$dmapper"
+ fi
+ done
+
+ if [ -n "$tmp_dm_path_" ] ; then
+ dm_path_="$tmp_dm_path_"
+ unset tmp_dm_path_
+ fi
+
dm_name_="${dm_path_##*/}"
dprint "dm_name_=\"$dm_name_\""
- dmsetup info $dm_name_ >/dev/null ||die "$dm_name_ is not aktive"
+ dmsetup info $dm_name_ >/dev/null ||die "$dm_name_ is not active"
device_=`$CRYPTSETUP_ status $dm_name_ |awk '/device:/{print $2}'` || \
die "could not get underlying device of $dm_path_"
dprint "device_=\"$device_\""
echo "$device_" |grep loop &>/dev/null && execute "losetup -d $device_" \
die "could not delete loop device $device_" || \
execute "losetup -d $device_ &>/dev/null" eprint "could not delete loop device $device_, \
-this device could possible not be a loop device => maybe bogus error"
+this device possibly is not a loop device => maybe bogus error"
notice "$mp_ successfully unmountet/closed/deleted"
}