diff --git a/units/user-config.target b/units/user-config.target index dae7d05..d7cb909 100644 --- a/units/user-config.target +++ b/units/user-config.target @@ -4,8 +4,8 @@ Requires=system-config.target After=system-config.target # Watch for configs at a couple common paths -Requires=user-cloudinit@media-configdrive-openstack-latest-user_data.path -After=user-cloudinit@media-configdrive-openstack-latest-user_data.path +Requires=user-configdrive.path +After=user-configdrive.path Requires=user-cloudinit@var-lib-coreos\x2dinstall-user_data.path After=user-cloudinit@var-lib-coreos\x2dinstall-user_data.path diff --git a/units/user-configdrive.path b/units/user-configdrive.path new file mode 100644 index 0000000..77a615a --- /dev/null +++ b/units/user-configdrive.path @@ -0,0 +1,5 @@ +[Unit] +Description=Watch for a cloud-config at /media/configdrive + +[Path] +DirectoryNotEmpty=/media/configdrive diff --git a/units/user-cloudinit@media-configdrive-openstack-latest-user_data.service b/units/user-configdrive.service similarity index 87% rename from units/user-cloudinit@media-configdrive-openstack-latest-user_data.service rename to units/user-configdrive.service index 6251821..762cfd2 100644 --- a/units/user-cloudinit@media-configdrive-openstack-latest-user_data.service +++ b/units/user-configdrive.service @@ -1,9 +1,8 @@ [Unit] -Description=Load cloud-config from %f +Description=Load cloud-config from /media/configdrive Requires=coreos-setup-environment.service After=coreos-setup-environment.service Before=user-config.target -ConditionFileNotEmpty=%f # HACK: work around ordering between config drive and ec2 metadata It is # possible for OpenStack style systems to provide both the metadata service @@ -21,4 +20,4 @@ After=ec2-cloudinit.service Type=oneshot RemainAfterExit=yes EnvironmentFile=-/etc/environment -ExecStart=/usr/bin/coreos-cloudinit --from-file=%f +ExecStart=/usr/bin/coreos-cloudinit --from-configdrive=/media/configdrive