Tag Archives: ubuntu

I can never remember the mapping of Ubuntu release numbers to names. This snippet helps in situations where I can’t use Puppet’s Facter.

export UBUNTU_RELEASE=''
case $(lsb_release -a) in
    *10.04*)
        UBUNTU_RELEASE='lucid';;
    *10.10*)
        UBUNTU_RELEASE='maverick';;
    *11.04*)
        UBUNTU_RELEASE='natty';;
    *11.10*)
        UBUNTU_RELEASE='oneiric';;
    *12.04*)
        UBUNTU_RELEASE='precise';;
    *12.10*)
        UBUNTU_RELEASE='quantal';;
    *13.04*)
        UBUNTU_RELEASE='raring';;
    *13.10*)
        UBUNTU_RELEASE='saucy';;
    *14.04*)
        UBUNTU_RELEASE='trusty';;
    *)
        echo 'Could not work out Ubuntu release name!' >&2
        exit 1
esac

echo $UBUNTU_RELEASE

Ubuntu’s silly release names

Advertisements
Tagged