Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
#!/bin/bash
# command -v lsb_release >/dev/null 2>&1 || { echo "This script requires lsb_release, but the command is not available." >&2; exit 1; }
# echo -e "This script will need to be run as root. To view the source of this script, visit:\n"
YOUR_INSTALL=$(head -1 /etc/issue | sed 's/ \\n \\l//')
if [ "$YOUR_INSTALL" = "Ubuntu 10.04" ] ; then
echo "Ubuntu 10.04"
elif [ "$YOUR_INSTALL" = "Ubuntu 11.04" ] ; then
echo "Ubuntu 11.04"
elif [ "$YOUR_INSTALL" = "Ubuntu 11.10" ] ; then
echo "Ubuntu 11.10"
elif [ "$YOUR_INSTALL" = "Ubuntu 12.04" ] ; then
echo "Ubuntu 12.04"
elif [ "$YOUR_INSTALL" = "Ubuntu 12.10" ] ; then
echo "Ubuntu 12.10"
elif [ "$YOUR_INSTALL" = "Ubuntu 13.04" ] ; then
echo "Ubuntu 13.04"
elif [ "$YOUR_INSTALL" = "Ubuntu 13.10" ] ; then
echo "Ubuntu 13.10"
elif [ "$YOUR_INSTALL" = "Ubuntu 14.04" ] ; then
echo "Ubuntu 14.04"
elif [ "$YOUR_INSTALL" = "Debian GNU/Linux 6.0" ] ; then
echo "Debian 6.0"
elif [ "$YOUR_INSTALL" = "Debian GNU/Linux 7" ] ; then
echo "Debian 7.0"
elif [[ "$YOUR_INSTALL" =~ "Debian GNU/Linux jessie" ]] ; then
echo "Debian Jessie"
echo "Unfortunately, your operating system is not yet supported by the Rackspace Monitoring Agent."
exit 1
elif [[ "$YOUR_INSTALL" =~ "Fedora release 19" ]] ; then
echo "Fedora 19"
elif [[ "$YOUR_INSTALL" =~ "Fedora release 20" ]] ; then
echo "Fedora 20"
elif [[ "$YOUR_INSTALL" =~ "Red Hat Enterprise Linux Server release 5" ]] ; then
echo "Fedora 19"
elif [[ "$YOUR_INSTALL" =~ "CentOS release 6.5" ]] ; then
echo "CentOS 6.5"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.