[prev in list] [next in list] [prev in thread] [next in thread]
List: dm-crypt
Subject: Re: [dm-crypt] How to recognize a LUKS container
From: Milan Broz <gmazyland () gmail ! com>
Date: 2015-09-23 8:39:06
Message-ID: 5602652A.4060301 () gmail ! com
[Download RAW message or body]
On 09/23/2015 09:50 AM, Michael Kjörling wrote:
> On 23 Sep 2015 02:29 +0000, from hmccurdy@yahoo.com (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
In generoic scripts I would better suggest to use blkid
(or libblkid if you need link to a library).
See blkid man page for all formatting etc. parameters.
Milan
_______________________________________________
dm-crypt mailing list
dm-crypt@saout.de
http://www.saout.de/mailman/listinfo/dm-crypt
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic