mirror of
https://github.com/optim-enterprises-bv/secureblue.git
synced 2025-11-01 02:47:46 +00:00
23 lines
857 B
Bash
Executable File
23 lines
857 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
# Remove vestigial authselect overrides from Anaconda
|
|
cp /usr/etc/authselect/system-auth /etc/authselect/system-auth
|
|
cp /usr/etc/authselect/fingerprint-auth /etc/authselect/fingerprint-auth
|
|
cp /usr/etc/authselect/dconf-db /etc/authselect/dconf-db
|
|
cp /usr/etc/authselect/authselect.conf /etc/authselect/authselect.conf
|
|
|
|
# Ensure we are on signed
|
|
RPM_OSTREE_STATUS=$(rpm-ostree status --json --booted)
|
|
IMAGE_BASE_STRING=$(echo $RPM_OSTREE_STATUS | jq -r '.deployments[0]."container-image-reference" // empty')
|
|
echo "Current image base: $IMAGE_BASE_STRING"
|
|
if [[ "$IMAGE_BASE_STRING" == *"signed"* ]]; then
|
|
echo "Already on signed. Exiting..."
|
|
exit 0
|
|
fi
|
|
|
|
IMAGE_REF_NAME=${IMAGE_BASE_STRING##*/}
|
|
echo "Rebasing to $IMAGE_REF_NAME"
|
|
rpm-ostree rebase ostree-image-signed:docker://ghcr.io/secureblue/$IMAGE_REF_NAME
|
|
|