#!/bin/sh
l=$(basename `losetup |awk '/'$1'/ {print $1}'`)
umount ${l}p1 && rmdir ${l}p1 &&
umount ${l}p2 && rmdir ${l}p2 &&
kpartx -d $1 || echo ERROR!!!
