Add a systemd service that runs ignition-rmcfg to delete userdata early
in first boot on VirtualBox and VMware. This will fail the boot if it
runs unsuccessfully, and can be masked in the config if desired. Add
/usr/libexec/ignition-rmcfg as a symlink to the Ignition binary in the
Dracut module, to save space.
Distros will probably want to enable this service by default.
Fixes https://github.com/coreos/ignition/issues/1315.
This is a distro-level integration service. Let's remove it from here
and have it live e.g. in coreos/fedora-coreos-config for FCOS/RHCOS.
Closes: #1125
See: https://github.com/openshift/installer/pull/2554
Basically the OpenShift installer on vSphere injects a service which reboots
the first time, but I believe this could easily race with `ignition-firstboot-complete`.
Let's mark the boot complete much earlier.
There was an extensive discussion of this on IRC. The basic
idea is we have a stamp file in `/boot`, same as CL does. However,
we use a GRUB *variable* `$coreos_firstboot` which is hardcoded in
the kernel arguments, but evaluates to the empty string if we're
not in the first boot.
This way we don't have to change the kernel arguments post-boot.
We previously had a systemd "quench" unit as a hardcoded Ignition
config here - I moved that to a regular installed unit that is
part of the package.