gitlabhq/gitlabhq — pull request #3603 by axilleas (2013-04-15 22:11:39+00:00)
Title: Added os_name support for systems running systemd.

When checking the system information, OSes running [systemd][] that don't have an `/etc/$name-release` can now be recognized with their real name instead of unknown, as systemd ships with [os-release][osrel] including the relevant information. Info is taken from the `PRETTY_NAME` string.

`/etc/os-release` examples:

#### Archlinux
```
NAME="Arch Linux"
ID=arch
PRETTY_NAME="Arch Linux"
ANSI_COLOR="0;36"
HOME_URL="https://www.archlinux.org/"
SUPPORT_URL="https://bbs.archlinux.org/"
BUG_REPORT_URL="https://bugs.archlinux.org/"
```

#### Fedora
```
NAME=Fedora
VERSION="18 (Spherical Cow)"
ID=fedora
VERSION_ID=18
PRETTY_NAME="Fedora 18 (Spherical Cow)"
ANSI_COLOR="0;34"
CPE_NAME="cpe:/o:fedoraproject:fedora:18"
```

[systemd]: http://www.freedesktop.org/wiki/Software/systemd
[osrel]: http://www.freedesktop.org/software/systemd/man/os-release.html