Fixed typo's Fedora implementation of ReleaseUpgrade

This commit is contained in:
2025-01-07 23:15:05 +01:00
parent 49a8f3aa2b
commit fd4bd0081a
3 changed files with 13 additions and 11 deletions

View File

@@ -78,7 +78,7 @@ echo "Enter the Alpine version to upgrade to"
fi fi
if $DoFedoraReleaseUpdate; then if $DoFedoraReleaseUpdate; then
echo "Enter the Fedora version to upgrade to" echo "Enter the Fedora version to upgrade to"
read NewFedoraVersionNewFedoraVersion read NewFedoraVersion
while true; do while true; do
read -p "Upgrade to Fedora $NewFedoraVersion, is this correct? -> yes/no?" yn read -p "Upgrade to Fedora $NewFedoraVersion, is this correct? -> yes/no?" yn
case $yn in case $yn in

View File

@@ -50,6 +50,7 @@ if [[ "${DIST}" == *"debian"* ]]; then
#Ask the wanted Debian version #Ask the wanted Debian version
DoDebianReleaseUpdate=true DoDebianReleaseUpdate=true
DoAlpineReleaseUpdate=false DoAlpineReleaseUpdate=false
DoFedoraReleaseUpdate=false
echo "Enter the Debian version to upgrade to" echo "Enter the Debian version to upgrade to"
read NewDebianVersion read NewDebianVersion
@@ -68,6 +69,7 @@ elif [[ "${DIST}" == *"alpine"* ]]; then
#Ask the wanted Alpine version #Ask the wanted Alpine version
DoAlpineReleaseUpdate=true DoAlpineReleaseUpdate=true
DoDebianReleaseUpdate=false DoDebianReleaseUpdate=false
DoFedoraReleaseUpdate=false
echo "Enter the Alpine version to upgrade to" echo "Enter the Alpine version to upgrade to"
read NewAlpineVersion read NewAlpineVersion
@@ -84,12 +86,12 @@ elif [[ "${DIST}" == *"alpine"* ]]; then
done done
elif [[ "${DIST}" == *"fedora"* ]]; then elif [[ "${DIST}" == *"fedora"* ]]; then
#Ask the wanted Fedora version #Ask the wanted Fedora version
DoDebianReleaseUpdate=true DoDebianReleaseUpdate=false
DoAlpineReleaseUpdate=true DoAlpineReleaseUpdate=false
DoFedoraReleaseUpdate=false DoFedoraReleaseUpdate=true
echo "Enter the Fedora version to upgrade to" echo "Enter the Fedora version to upgrade to"
read NewFedoraVersionNewFedoraVersion read NewFedoraVersion
while true; do while true; do
read -p "Upgrade to Fedora $NewFedoraVersion, is this correct? -> yes/no?" yn read -p "Upgrade to Fedora $NewFedoraVersion, is this correct? -> yes/no?" yn
case $yn in case $yn in

View File

@@ -202,18 +202,18 @@ UpgradeRelease () {
else else
echo "Notice: Skiped, already up-to-date" echo "Notice: Skiped, already up-to-date"
fi fi
elif [[ "${DIST}" == *"fedora"* ]]; then elif [[ "${DIST}" == *"alpine"* ]]; then
echo "Notice: Release upgrade disabled for Fedora" echo "Notice: Release upgrade disabled for Alpine"
elif [[ "${DIST}" == *"alpine"* ]] && $DoFedoraReleaseUpdate ; then elif [[ "${DIST}" == *"fedora"* ]] && $DoFedoraReleaseUpdate ; then
if [ $RELVERSION != $NewFedoraVersion ]; then if [ $RELVERSION != $NewFedoraVersion ]; then
#Create snapshot before upgrading #Create snapshot before upgrading
$SNAPSHOTCMD "Before upgrade form Fedora $RELVERSION to Fedora $NewFedoraVersion" $SNAPSHOTCMD "Before upgrade form Fedora $RELVERSION to Fedora $NewFedoraVersion"
#Fully update current version #Fully update current version
$INSTCALL -- dnf install dnf-plugin-system-upgrade remove-retired-packages symlinks clean-rpm-gpg-pubkey -y $INSTCALL -- dnf install dnf-plugin-system-upgrade remove-retired-packages symlinks clean-rpm-gpg-pubkey -y
$INSTCALL -- dnf upgrade --refresh -y $INSTCALL -- dnf upgrade --refresh -y
$INSTCALL -- system-upgrade download --releasever=$RELVERSION -y $INSTCALL -- dnf system-upgrade download --releasever=$NewFedoraVersion -y
$INSTCALL -- system-upgrade reboot $INSTCALL -- dnf system-upgrade reboot
echo waiting 5 minutes for Fedora to install its update while rebooting echo Waiting 5 minutes for Fedora to install its update while rebooting
sleep 300 sleep 300
$INSTCALL -- dnf remove --duplicates -y $INSTCALL -- dnf remove --duplicates -y
$INSTCALL -- dnf autoremove -y $INSTCALL -- dnf autoremove -y