Skip to contentSkip to conversation

What's the best way to check if device is already deactivated ?

dm-crypt Aaron Lewis 1 participant 1 message Jan 7, 2011

lore
Share & tools
lore
#0 lore raw

Hi,
Planning to post a patch within a shell script , how about simply check
if /dev/mapper/DEV_NAME exist is well enough ?

	if [ -e /dev/mapper/$target ];then
		...
	else
		...
	fi

	Thanks.
Signature · 3 lines
Best Regards,
Aaron Lewis - PGP: 0xDFE6C29E ( http://keyserver.veridis.com )
Finger Print: 9482 448F C7C3 896C 1DFE 7DD3 2492 A7D0 DFE6 C29E