summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorRyan Harper <ryan.harper@canonical.com>2020-03-25 09:01:11 -0500
committerGitHub <noreply@github.com>2020-03-25 10:01:11 -0400
commit3f6746c6113ec9f691ff7e4f5ed3764d4261373b (patch)
treec5b64e91b3d3e3b8fd143bf99e835f7b494da031 /doc
parentc5e949c02a1d5226ae9b1cb39846db19d223c6c2 (diff)
downloadvyos-cloud-init-3f6746c6113ec9f691ff7e4f5ed3764d4261373b.tar.gz
vyos-cloud-init-3f6746c6113ec9f691ff7e4f5ed3764d4261373b.zip
util: read_cc_from_cmdline handle urlencoded yaml content (#275)
Add support for additional escaping of formatting characters in the YAML content between the 'cc:' and 'end_cc' tokens. On s390x legacy terminals the use of square brackets [] are not available limiting the ability to indicate lists of values in yaml content. Using #5B and #5D, [ and ] respectively enables s390x users to pass list yaml content into cloud-init via command line interface.
Diffstat (limited to 'doc')
-rw-r--r--doc/examples/kernel-cmdline.txt7
1 files changed, 5 insertions, 2 deletions
diff --git a/doc/examples/kernel-cmdline.txt b/doc/examples/kernel-cmdline.txt
index f043baef..04a1ad89 100644
--- a/doc/examples/kernel-cmdline.txt
+++ b/doc/examples/kernel-cmdline.txt
@@ -3,16 +3,19 @@ configuration that comes from the kernel command line has higher priority
than configuration in /etc/cloud/cloud.cfg
The format is:
- cc: <yaml content here> [end_cc]
+ cc: <yaml content here|URL encoded yaml content> [end_cc]
cloud-config will consider any content after 'cc:' to be cloud-config
data. If an 'end_cc' string is present, then it will stop reading there.
otherwise it considers everthing after 'cc:' to be cloud-config content.
-In order to allow carriage returns, you must enter '\\n', literally,
+In order to allow carriage returns, you must enter '\\n', literally,
on the command line two backslashes followed by a letter 'n'.
+The yaml content may also be URL encoded (urllib.parse.quote()).
+
Here are some examples:
root=/dev/sda1 cc: ssh_import_id: [smoser, kirkland]\\n
root=LABEL=uec-rootfs cc: ssh_import_id: [smoser, bob]\\nruncmd: [ [ ls, -l ], echo hi ] end_cc
cc:ssh_import_id: [smoser] end_cc cc:runcmd: [ [ ls, -l ] ] end_cc root=/dev/sda1
+ cc:ssh_import_id: %5Bsmoser%5D end_cc cc:runcmd: %5B %5B ls, -l %5D %5D end_cc root=/dev/sda1