diff options
| author | Scott Moser <smoser@ubuntu.com> | 2016-03-04 00:41:52 -0500 |
|---|---|---|
| committer | Scott Moser <smoser@ubuntu.com> | 2016-03-04 00:41:52 -0500 |
| commit | 3400f839651d308e495d1d8a1d7c1c2b463ad98b (patch) | |
| tree | 91bb7977e00c18d955c1b5a10a366bdb94422295 /systemd/cloud-init.target | |
| parent | 2231c45ac3712c5cb7c1b810c838d3f91f424bf2 (diff) | |
| parent | 9b0cbf54a90d2434e2a93e34664646ee8638fc97 (diff) | |
| download | vyos-cloud-init-3400f839651d308e495d1d8a1d7c1c2b463ad98b.tar.gz vyos-cloud-init-3400f839651d308e495d1d8a1d7c1c2b463ad98b.zip | |
systemd: support disabling cloud-init via file or kernel cmdline
This adds a systemd generator for a 'cloud-init.target'. That target will
be WantedBy multi-user.target in the default case. If there is a file
/etc/cloud/cloud-init.disabled or the kernel command line contains
'cloud-init=disabled' then cloud-init will not affect boot at all.
There are some packages/debian changes to affect this:
* postinst, preinst: these are necessary to remove some
old target files for multi-user.target (LP: #1552999)
* changes to include these files in the debian source package.
* rules.in: supports DEB_BUILD_OPTIONS=nocheck to not run check
setup.py: mostly changes to support installing the generator
but also pep8 fixes along the way
systemd/*: make each of the services 'WantedBy=cloud-init.target'
rather than being wanted by multi-user.target
Diffstat (limited to 'systemd/cloud-init.target')
| -rw-r--r-- | systemd/cloud-init.target | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/systemd/cloud-init.target b/systemd/cloud-init.target new file mode 100644 index 00000000..a63babb0 --- /dev/null +++ b/systemd/cloud-init.target @@ -0,0 +1,6 @@ +# cloud-init target is enabled by cloud-init-generator +# To disable it you can either: +# a.) boot with kernel cmdline of 'cloudinit=disabled' +# b.) touch a file /etc/cloud/cloud-init.disabled +[Unit] +Description=Cloud-init target |
