Skip to content

Commit

Permalink
fix: Ensure topgrade config always exists
Browse files Browse the repository at this point in the history
  • Loading branch information
KyleGospo committed Feb 6, 2024
1 parent 17edc1b commit 1dcbb5f
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 1dcbb5f

Please sign in to comment.