Skip to content

Commit

Permalink
Don't remove YaST reconfig_system marker if called from ignition
Browse files Browse the repository at this point in the history
If firstboot was triggered by presence of the reconfig_system marker,
ignition-kargs-helper's call to combustion removes the marker and after the
reboot the other firstboot stages would not run. Only remove the marker if it
was an actual combustion run.
  • Loading branch information
Vogtinator committed Aug 18, 2023
1 parent 31cc0e4 commit fb008f2
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
13 changes: 12 additions & 1 deletion combustion
Expand Up @@ -98,6 +98,15 @@ EOF
exit 0
fi

# Set by combustion.service but not ignition-kargs-helper.
# Controls whether config is actually completed by this step,
# triggering deletion of /var/lib/YaST2/reconfig_system
complete=0

if [ "${1-}" = "--complete" ]; then
complete=1
fi

delete_resolv_conf=0

cleanup() {
Expand Down Expand Up @@ -208,6 +217,8 @@ else
chroot /sysroot snapper --no-dbus create -d "After combustion configuration" || :
fi

rm -f /sysroot/var/lib/YaST2/reconfig_system
if [ "${complete}" -eq 1 ]; then
rm -f /sysroot/var/lib/YaST2/reconfig_system
fi

exit 0
2 changes: 1 addition & 1 deletion combustion.service
Expand Up @@ -28,7 +28,7 @@ Conflicts=dracut-emergency.service emergency.service emergency.target

[Service]
Type=oneshot
ExecStart=/usr/bin/combustion
ExecStart=/usr/bin/combustion --complete

[Install]
RequiredBy=firstboot.target

0 comments on commit fb008f2

Please sign in to comment.