Skip to content

Instantly share code, notes, and snippets.

@kallisti5
Created December 31, 2014 14:31
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save kallisti5/01f6df3bfb77b978abfe to your computer and use it in GitHub Desktop.
Upgrade DO Fedora 20 to Fedora 21
#!/bin/bash
# Digital Ocean Fedora 20 -> 21 upgrade script
# 2014, Alexander von Gluck IV
# Author not responsible for data loss. Ensure you have valid
# backups before using this script!
yum update
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-21-$(uname -i)
yum update yum
yum clean all
yum --releasever=21 distro-sync
yum remove firewalld-config-standard
yum install system-release-server
sync
echo "Now, change the kernel to 'vmlinuz-3.17.7-200.fc20.x86_64' and power the droplet back on"
shutdown -h now
@sianios
Copy link

sianios commented Dec 31, 2014

Allow me to make a few modifications

#Check if user is root
if [[ $EUID -ne 0 ]]; then
    echo "Sudo privileges required!"
    exit 1;
fi

yum update
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-21-$(uname -i)
yum update yum
yum clean all
yum --releasever=21 distro-sync
yum remove firewalld-config-standard
yum install system-release-server

sync

echo "Now, change the kernel to 'vmlinuz-3.17.7-200.fc20.x86_64' and power the droplet back on"
read -n 1 -p "Press any key to continue..."
shutdown -h now

Copy link

ghost commented Jan 9, 2015

folks who have enabled selinux (or might want to in the future) should also run

restorecon -R /

@iddqd3
Copy link

iddqd3 commented Oct 7, 2015

thanks

P.S use this script in a screen!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment