fix: Ensure topgrade config always exists

This commit is contained in:
Kyle Gospodnetich 2024-02-06 12:52:26 -08:00
parent 17edc1b92f
commit 1dcbb5fc97

View File

@ -7,7 +7,7 @@ IMAGE_FLAVOR=$(jq -r '."image-flavor"' < $IMAGE_INFO)
FEDORA_VERSION=$(jq -r '."fedora-version"' < $IMAGE_INFO)
# SCRIPT VERSION
HWS_VER=29
HWS_VER=30
HWS_VER_FILE="/etc/bazzite/hws_version"
HWS_VER_RAN=$(cat $HWS_VER_FILE)
@ -226,6 +226,12 @@ if grep -qv "graphical.target" <<< "$(systemctl get-default)"; then
systemctl set-default graphical.target
fi
# Ensure file needed for topgrade is present
if [[ ! -f "/etc/ublue-os/topgrade.toml" ]]; then
mkdir -p "/etc/ublue-os"
cp "/usr/etc/ublue-os/topgrade.toml" "/etc/ublue-os/topgrade.toml"
fi
mkdir -p /etc/bazzite
echo $HWS_VER > $HWS_VER_FILE
echo $IMAGE_NAME > $KNOWN_IMAGE_NAME_FILE