Add an `inject-core-user` image option
Originally I tried to use the `image-postprocess` but libguestfs'
SELinux support isn't sufficient.
This is an ideally temporary hack until we rework Ignition to add
the user.
@@ -115,6 +115,10 @@ if subprocess.call(['ostree', f"--repo={args.ostree_repo}", 'ls', args.ostree_re
%end
""")
+# Undocumented hack until we change Ignition to handle this
+if image_conf.get('inject-core-user'):
+ ks_tmp.write("user --name=core --groups='wheel,sudo,adm,systemd-journal'\n")
+
# This is an implementation detail of https://github.com/coreos/ignition-dracut
# So we hardcode it here.
# See: https://github.com/coreos/ignition-dracut/pull/12
