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
41
41
exit 0
42
42
fi
43
43
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
+
44
58
# 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
46
60
# In this case the user is likely following some other image (quay.io/userx/fedora-coreos:testing)
47
61
# but it should still be ok to error here because zincati probably shouldn't be enabled?
48
62
echo " ERROR: The booted container imgref doesn't match the Fedora CoreOS default."
49
63
exit 1
50
64
fi
51
65
52
-
53
66
# gather information to populate the booted-status-override.json file
54
67
version=$( jq -r ' .deployments[0].version' <<< " $status" )
55
68
base_commit_meta=$( jq -r ' .deployments[0]."base-commit-meta"' <<< " $status" )
You can’t perform that action at this time.
0 commit comments