[Pkg-cryptsetup-devel] Bug#451916: Bug#451916: Bug#451916: cryptsetup: loopback device not detached after "/etc/init.d/cryptdisks stop"

René Pavlík rene.pavlik at sysgo.com
Tue Dec 4 02:34:23 UTC 2007


Jonas Meurer wrote:
> Ok, I just found out that 'cryptsetup status $dst' gives us the
> information we need. the following works but could be implemented
> better:
> 
> loopdev="/dev/"$(cryptsetup status "$dst" | grep "device" | sed -e 's/.*device.*\///g' | grep "^loop" || true)

Hi,

I modified this a little bit. What do you think? I know, you have found a better
solution already but with this you will get the exact device filename directly
and is "more secure":

loopdev=$(cryptsetup status "$dst"  | grep "device:" | sed -e 's/.*device: *//g'
| grep "^/dev/loop" || true)


Just an idea, use what you want. :-)


Regards,

	Rene





More information about the Pkg-cryptsetup-devel mailing list