Skip to content

Commit

Permalink
Complain about too old updatevm, while it's still possible to change it
Browse files Browse the repository at this point in the history
  • Loading branch information
marmarek committed Jan 17, 2022
1 parent 709c91e commit 8358e67
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions qubes-dist-upgrade.sh
Original file line number Diff line number Diff line change
Expand Up @@ -193,11 +193,13 @@ update_prechecks() {
fi
fi
fi
# updatevm_template="$(qvm-prefs "$updatevm" template)"
# if [ "$updatevm_template" != "fedora-30" ] && [ "$updatevm_template" != "debian-10" ]; then
# echo "ERROR: UpdateVM should be a Fedora 30+ or Debian 10+ template based VM."
# exit 1
# fi
updatevm_template="$(qvm-prefs "$updatevm" template)"
updatevm_template_version=$(sed -ne 's/\(fedora\|debian\)-\([0-9]\+\).*/\2/p' <<<"$updatevm_template")
if ! [[ "$updatevm_template" = "fedora-"* && "$updatevm_template_version" -ge 30 ]] &&
! [[ "$updatevm_template" = "debian-"* && "$updatevm_template_version" -ge 11 ]]; then
echo "ERROR: UpdateVM ($updatevm) should be at least Fedora 30 or Debian 11 template based VM."
exit 1
fi
}

default_grub_config() {
Expand Down

0 comments on commit 8358e67

Please sign in to comment.