feat(proc-cmdline): Add proc-cmdline unit

This unit will always be started, but will only do anything if
a `cloud-config-url=<url>` token is provided in /proc/cmdline.
This commit is contained in:
Brian Waldon 2014-04-22 16:56:14 -07:00
parent 46b046c82e
commit 49adf19081
2 changed files with 15 additions and 0 deletions

View File

@ -0,0 +1,12 @@
[Unit]
Description=Load cloud-config from url defined in /proc/cmdline
Requires=coreos-setup-environment.service
After=coreos-setup-environment.service
Before=user-config.target
ConditionKernelCommandLine=cloud-config-url
[Service]
Type=oneshot
RemainAfterExit=yes
EnvironmentFile=-/etc/environment
ExecStart=/usr/bin/coreos-cloudinit --from-proc-cmdline

View File

@ -6,3 +6,6 @@ After=system-config.target
# Load user_data placed by coreos-install
Requires=user-cloudinit@var-lib-coreos\x2dinstall-user_data.service
After=user-cloudinit@var-lib-coreos\x2dinstall-user_data.service
Requires=user-cloudinit-proc-cmdline.service
After=user-cloudinit-proc-cmdline.service