Re: How to recognize a LUKS container

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 23 Sep 2015 02:29 +0000, from hmccurdy@xxxxxxxxx (H McCurdy):
> I might have figured it out but can't test my idea until tomorrow. 
> My thought is to try to access it as if it exists and if the
> function returns -1, then it's not a valid LUKS container.  Anyway,
> that's my idea.

For the scenario you describe, something like

# test -r $DEVICE && cryptsetup isLuks $DEVICE && echo It is LUKS

is probably the best bet.

-- 
Michael Kjörling • https://michael.kjorling.se • michael@xxxxxxxxxxx
OpenPGP B501AC6429EF4514 https://michael.kjorling.se/public-keys/pgp
                 “People who think they know everything really annoy
                 those of us who know we don’t.” (Bjarne Stroustrup)
_______________________________________________
dm-crypt mailing list
dm-crypt@xxxxxxxx
http://www.saout.de/mailman/listinfo/dm-crypt




[Index of Archives]     [Device Mapper Devel]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Packaging]     [Fedora SELinux]     [Yosemite News]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux