Skip to content

Commit

Permalink
05core/autologin: query journal instead of /run/ignition.json
Browse files Browse the repository at this point in the history
We shouldn't use `/run/ignition.json` to determine whether a user
config was provided since it's implementation details. Instead, use the
new official journal messages that Ignition emits.

Closes: #514
  • Loading branch information
jlebon committed Jul 15, 2020
1 parent 1486aeb commit 66dcf25
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,9 @@ 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
# 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

Expand Down

0 comments on commit 66dcf25

Please sign in to comment.