templates: Make sure m-c-d-firstboot service doesn't run during firstboot
We first want to make sure that updated machine-config-dameon
package get in into bootimage and things runs as expected.
Once verified, we will update m-c-d-firstboot service to run
during firstboot
@@ -3,10 +3,13 @@ enabled: true
contents: |
[Unit]
Description=Machine Config Daemon Firstboot
- # This effectively disables this unit unit we patch the MCS, so
- # we can land this code and then get it built into the host.
+ # Make sure it runs only on OSTree booted system
+ ConditionPathExists=/run/ostree-booted
+ # This effectively disables this unit unitl we get latest
+ # machine-config-daemon package into bootimage
ConditionPathExists=!/etc/pivot/image-pullspec
ConditionPathExists=/etc/ignition-machine-config-encapsulated.json
+ BindsTo=ignition-firstboot-complete.service
After=ignition-firstboot-complete.service
Before=kubelet.service
