From 6a2a591cc0e02f1f34fe64c96c873fd6e56cc152 Mon Sep 17 00:00:00 2001 From: James Falcon Date: Mon, 14 Feb 2022 10:25:35 -0600 Subject: [PATCH 1/3] docs: Add more details to runcmd docs --- cloudinit/config/cc_runcmd.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/cloudinit/config/cc_runcmd.py b/cloudinit/config/cc_runcmd.py index 15cbaf1ac81..aeb4418b4fc 100644 --- a/cloudinit/config/cc_runcmd.py +++ b/cloudinit/config/cc_runcmd.py @@ -32,10 +32,12 @@ """\ Run arbitrary commands at a rc.local like level with output to the console. Each item can be either a list or a string. If the item is a - list, it will be properly executed as if passed to ``execve()`` (with - the first arg as the command). If the item is a string, it will be - written to a file and interpreted - using ``sh``. + list, it will be properly quoted. Each item is written to + ``/var/lib/cloud/instance/runcmd`` to be later interpreted using + ``sh``. + + Note that the ``runcmd`` module only writes the script to be run + later. The module that actually runs the script is ``scripts-user``. .. note:: From b83ff7b477a4d9f60d79059840841b473a3b797b Mon Sep 17 00:00:00 2001 From: James Falcon Date: Mon, 14 Feb 2022 12:55:13 -0600 Subject: [PATCH 2/3] Update cloudinit/config/cc_runcmd.py Co-authored-by: Chad Smith --- cloudinit/config/cc_runcmd.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cloudinit/config/cc_runcmd.py b/cloudinit/config/cc_runcmd.py index aeb4418b4fc..fa768516e62 100644 --- a/cloudinit/config/cc_runcmd.py +++ b/cloudinit/config/cc_runcmd.py @@ -37,7 +37,8 @@ ``sh``. Note that the ``runcmd`` module only writes the script to be run - later. The module that actually runs the script is ``scripts-user``. + later. The module that actually runs the script is ``scripts-user`` + in the ref:`Final` boot stage. .. note:: From 0bda3cf2a8896b7d8bf435db3be8947a0d80fa09 Mon Sep 17 00:00:00 2001 From: James Falcon Date: Mon, 14 Feb 2022 13:08:03 -0600 Subject: [PATCH 3/3] semicolon --- cloudinit/config/cc_runcmd.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cloudinit/config/cc_runcmd.py b/cloudinit/config/cc_runcmd.py index fa768516e62..d2c10f9b83a 100644 --- a/cloudinit/config/cc_runcmd.py +++ b/cloudinit/config/cc_runcmd.py @@ -38,7 +38,7 @@ Note that the ``runcmd`` module only writes the script to be run later. The module that actually runs the script is ``scripts-user`` - in the ref:`Final` boot stage. + in the :ref:`Final` boot stage. .. note::