From: Milan Broz <gmazyland@gmail.com>
To: "Michael Kjörling" <michael@kjorling.se>, dm-crypt@saout.de
Subject: Re: [dm-crypt] How to recognize a LUKS container
Date: Wed, 23 Sep 2015 10:39:06 +0200 [thread overview]
Message-ID: <5602652A.4060301@gmail.com> (raw)
In-Reply-To: <20150923075056.GA5504@yeono.kjorling.se>
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
next prev parent reply other threads:[~2015-09-23 8:39 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-22 18:52 [dm-crypt] How to recognize a LUKS container H McCurdy
2015-09-22 20:03 ` Ralf Ramsauer
2015-09-22 20:14 ` Ralf Ramsauer
2015-09-22 20:19 ` Michael Kjörling
2015-09-23 2:29 ` H McCurdy
2015-09-23 7:50 ` Michael Kjörling
2015-09-23 8:39 ` Milan Broz [this message]
2015-09-22 20:13 ` Arno Wagner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5602652A.4060301@gmail.com \
--to=gmazyland@gmail.com \
--cc=dm-crypt@saout.de \
--cc=michael@kjorling.se \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.