[lxc-devel] [lxc/master] Add template-options to help output

adamkasztenny on Github lxc-bot at linuxcontainers.org
Fri Nov 30 17:35:06 UTC 2018


A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 429 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20181130/5d75f21d/attachment.bin>
-------------- next part --------------
From 4f5d04bd6351cdd16aaca2771ec008e4059d2564 Mon Sep 17 00:00:00 2001
From: Adam Kasztenny <adamkasztenny at gmail.com>
Date: Fri, 30 Nov 2018 12:34:34 -0500
Subject: [PATCH] Add template-options to help output

Copied from the [manpage](https://github.com/lxc/lxc/blob/9e42c1e3f102be48be9014e1ecbacc2a57446e20/doc/lxc-create.sgml.in#L175).
---
 src/lxc/tools/lxc_create.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/lxc/tools/lxc_create.c b/src/lxc/tools/lxc_create.c
index 819f7d4a08..4bafbd9aa2 100644
--- a/src/lxc/tools/lxc_create.c
+++ b/src/lxc/tools/lxc_create.c
@@ -62,7 +62,7 @@ static struct lxc_arguments my_args = {
 	.progname     = "lxc-create",
 	.helpfn       = create_helpfn,
 	.help         = "\
---name=NAME --template=TEMPLATE [OPTION...]\n\
+--name=NAME --template=TEMPLATE [OPTION...] [-- template-options]\n\
 \n\
 lxc-create creates a container\n\
 \n\
@@ -96,7 +96,11 @@ Options :\n\
                                 (Default: ext4)\n\
       --fssize=SIZE[U]          Create filesystem of\n\
                                 size SIZE * unit U (bBkKmMgGtT)\n\
-                                (Default: 1G, default unit: M)\n",
+                                (Default: 1G, default unit: M)\n\
+  -- template-options\n\
+         This will pass template-options to the template as arguments.\n\
+         To see the list of options supported by the template,\n\
+         you can run lxc-create -t TEMPLATE -h.\n",
 	.options      = my_longopts,
 	.parser       = my_parser,
 	.checker      = NULL,


More information about the lxc-devel mailing list