diff --git a/overlay.d/05core/usr/lib/systemd/system-generators/coreos-liveiso-autologin-generator b/overlay.d/05core/usr/lib/systemd/system-generators/coreos-liveiso-autologin-generator index dec68b3c30..af8ea9d445 100755 --- a/overlay.d/05core/usr/lib/systemd/system-generators/coreos-liveiso-autologin-generator +++ b/overlay.d/05core/usr/lib/systemd/system-generators/coreos-liveiso-autologin-generator @@ -101,8 +101,22 @@ fi # If the user supplied an Ignition config, they have the ability to enable # autologin themselves. Don't automatically render them insecure, since # they might be running in production and booting via e.g. IPMI. -if [ -e /run/ignition.json ] ; then - exit 0 + +# This is a hack for RHCOS Ignition which doesn't have +# https://github.com/coreos/ignition/pull/958. This works because right now both +# RHCOS and FCOS unconditionally bake in a base config. Once RHCOS moves to +# Ignition v2, we can drop this and just leave the else block. +ign_basecfg_msg=$(journalctl -q MESSAGE_ID=57124006b5c94805b77ce473e92a8aeb IGNITION_CONFIG_TYPE=base) +if [ -z "${ign_basecfg_msg}" ]; then + if [ -e /run/ignition.json ]; then + exit 0 + fi +else + # See https://github.com/coreos/ignition/pull/958 for the MESSAGE_ID source. + ign_usercfg_msg=$(journalctl -q MESSAGE_ID=57124006b5c94805b77ce473e92a8aeb IGNITION_CONFIG_TYPE=user) + if [ -n "${ign_usercfg_msg}" ]; then + exit 0 + fi fi write_dropin "getty@.service" "--noclear"