File tree Expand file tree Collapse file tree 1 file changed +15
-2
lines changed
overlay.d/35container-signing-migration/usr/libexec Expand file tree Collapse file tree 1 file changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -41,15 +41,28 @@ if [[ "$booted_imgref" =~ ostree-image-signed:docker://quay.io/fedora/fedora-cor
4141 exit 0
4242fi
4343
44+ booted_imgref_matches_expected () {
45+ local imgref=$1
46+ if [[ " $imgref " =~ ostree-remote-image:fedora:docker://quay.io/fedora/fedora-coreos ]]; then
47+ return 0
48+ fi
49+ if [[ " $imgref " =~ ostree-remote-registry:fedora:quay.io/fedora/fedora-coreos ]]; then
50+ # We could end up here if someone rebased following the instructions from:
51+ # https://github.com/coreos/fedora-coreos-docs/blob/fde6977fdb8b3ebc6b1e54e44d7ca099f0d3c372/modules/ROOT/pages/update-streams.adoc?plain=1#L59
52+ # See https://github.com/coreos/fedora-coreos-tracker/issues/2035#issuecomment-3327648073
53+ return 0
54+ fi
55+ return 1 # Didn't match expected starting state
56+ }
57+
4458# Error if the machine starting state doesn't match expectation
45- if [[ ! " $booted_imgref " =~ ostree-remote-image:fedora:docker://quay.io/fedora/fedora-coreos ]] ; then
59+ if ! booted_imgref_matches_expected " $booted_imgref " ; then
4660 # In this case the user is likely following some other image (quay.io/userx/fedora-coreos:testing)
4761 # but it should still be ok to error here because zincati probably shouldn't be enabled?
4862 echo " ERROR: The booted container imgref doesn't match the Fedora CoreOS default."
4963 exit 1
5064fi
5165
52-
5366# gather information to populate the booted-status-override.json file
5467version=$( jq -r ' .deployments[0].version' <<< " $status" )
5568base_commit_meta=$( jq -r ' .deployments[0]."base-commit-meta"' <<< " $status" )
You can’t perform that action at this time.
0 commit comments