Skip to content

Added os_name support for systems running systemd.

Matthias Käppler requested to merge github/fork/axilleas/os-name into master

Created by: axilleas

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 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"

Merge request reports

Loading