From: Milan Broz <gmazyland@gmail.com>
To: "Jörg Kastning" <joerg.kastning@my-it-brain.de>
Cc: dm-crypt <dm-crypt@saout.de>
Subject: Re: [dm-crypt] Do you accept contributions to manpage via patch?
Date: Thu, 22 Oct 2020 10:36:07 +0200 [thread overview]
Message-ID: <632166d2-4306-522b-7806-0ba76bddcbcb@gmail.com> (raw)
In-Reply-To: <29bb2e5b-5509-9ebc-8a9a-fec09842910f@my-it-brain.de>
On 20/10/2020 21:53, Jörg Kastning wrote:
>
> I've renamed "BASIC COMMANDS" to "BASIC ACTIONS" because the commands
> are called action in the SYNOPSIS, too. Furthermore I changed a sentence
> saying that luksFormat would work on unmapped luks containers, only. And
> last but not least I've added the Section "EXAMPLE" with six examples of
> common use cases.
Hi,
thanks for the patch. I would better use word "command" in future, but for now
it is ok (we will split man page in future and unify terminology a little bit later).
But I have some notes before I can merge this.
- the example section - one example how to use --type is perhaps ok, but definitely
normal user should never use this option. I will remove it from example 2 and 3.
It has no meaning there anyway, the format is set during luksFormat only.
(And LUKS2 is default format in many distros already.)
- example 5 needs a strong warning, this command make the LUKS device unusable.
(but still detected as LUKS block device). It is really meant only for data destruction
by removing all volume keys slots from header.
- please, is really your name in the man page necessary?
There are a lot of contributors not mentioned there.
This is quite trivial change and we track authors of such small changes through git
commits only (I will reformat it so you are the patch author in git; or you can use
use git format-patch)
But in general, yes, we are missing the examples section there... strange :)
Thanks,
Milan
*** 1490,1495 ****
--- 1490,1514 ----
.TP
.B "\-\-help, \-?"
Show help text and default parameters.
+ .SH EXAMPLE
+ .TP
+ Example 1: Create LUKS 2 container on block device /dev/sdX.
+ sudo cryptsetup --type luks2 luksFormat /dev/sdX
+ .TP
+ Example 2: Add an additional passphrase to key slot 5.
+ sudo cryptsetup --type luks2 luksAddKey --key-slot 5 /dev/sdX
+ .TP
+ Example 3: Create LUKS header backup and save it to file.
+ sudo cryptsetup --type luks2 luksHeaderBackup /dev/sdX --header-backup-file /var/tmp/NameOfBackupFile
+ .TP
+ Example 4: Open LUKS contaner on /dev/sdX and map it to sdX_crypt.
+ sudo cryptsetup open /dev/sdX sdX_crypt
+ .TP
+ Example 5: Erase all key slots on /dev/sdX.
+ sudo cryptsetup erase /dev/sdX
+ .TP
+ Example 6: Restore LUKS header from backup file.
+ sudo cryptsetup luksHeaderRestore /dev/sdX --header-backup-file /var/tmp/NameOfBackupFile
.SH RETURN CODES
Cryptsetup returns 0 on success and a non-zero value on error.
***************
*** 1710,1715 ****
--- 1729,1736 ----
Man page extensions by Milan Broz <gmazyland@gmail.com>.
.br
Man page rewrite and extension by Arno Wagner <arno@wagner.name>.
+ .br
+ Add Examples and minor rewrite by Joerg Kastning <jkastning@my-it-brain.de>.
.SH COPYRIGHT
Copyright \(co 2004 Jana Saout
.br
next prev parent reply other threads:[~2020-10-22 8:36 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-18 11:54 [dm-crypt] Do you accept contributions to manpage via patch? Jörg Kastning
2020-10-18 14:18 ` Milan Broz
2020-10-20 19:53 ` Jörg Kastning
2020-10-22 8:36 ` Milan Broz [this message]
2020-10-22 9:37 ` Jörg Kastning
2020-10-22 9:56 ` Milan Broz
2020-10-22 16:05 ` Jörg Kastning
2020-11-05 20:02 ` Jörg Kastning
2020-11-05 20:30 ` Milan Broz
2020-11-05 22:50 ` Arno Wagner
2020-11-12 12:39 ` Milan Broz
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=632166d2-4306-522b-7806-0ba76bddcbcb@gmail.com \
--to=gmazyland@gmail.com \
--cc=dm-crypt@saout.de \
--cc=joerg.kastning@my-it-brain.de \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox