cloudinit: Fix disabling cloud-init on first boot
`sudo` throws errors and is not even required to write the `disable` file. Also add a message to the file that it was created by us Signed-off-by: Cole Robinson <crobinso@redhat.com>
This commit is contained in:
parent
767f856017
commit
78e24fc986
|
@ -95,7 +95,8 @@ def _create_userdata_content(cloudinit_data):
|
|||
|
||||
if cloudinit_data.disable:
|
||||
content += "runcmd:\n"
|
||||
content += "- [ sudo, touch, /etc/cloud/cloud-init.disabled ]\n"
|
||||
content += ('- echo "Disabled by virt-install" > '
|
||||
"/etc/cloud/cloud-init.disabled\n")
|
||||
|
||||
clean_content = re.sub(r"root:(.*)", 'root:[SCRUBBLED]', content)
|
||||
if "VIRTINST_TEST_SUITE_PRINT_CLOUDINIT" in os.environ:
|
||||
|
|
Loading…
Reference in New Issue