os-release.xml revision e17fb72914e328f962e5df1bf88f301c0e7fa6e1
e17fb72914e328f962e5df1bf88f301c0e7fa6e1Lennart Poettering<?xml-stylesheet type="text/xsl" href="http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl"?>
e17fb72914e328f962e5df1bf88f301c0e7fa6e1Lennart Poettering<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
e17fb72914e328f962e5df1bf88f301c0e7fa6e1Lennart Poettering "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
e17fb72914e328f962e5df1bf88f301c0e7fa6e1Lennart Poettering This file is part of systemd.
e17fb72914e328f962e5df1bf88f301c0e7fa6e1Lennart Poettering Copyright 2010 Lennart Poettering
e17fb72914e328f962e5df1bf88f301c0e7fa6e1Lennart Poettering systemd is free software; you can redistribute it and/or modify it
e17fb72914e328f962e5df1bf88f301c0e7fa6e1Lennart Poettering under the terms of the GNU General Public License as published by
e17fb72914e328f962e5df1bf88f301c0e7fa6e1Lennart Poettering the Free Software Foundation; either version 2 of the License, or
e17fb72914e328f962e5df1bf88f301c0e7fa6e1Lennart Poettering (at your option) any later version.
e17fb72914e328f962e5df1bf88f301c0e7fa6e1Lennart Poettering systemd is distributed in the hope that it will be useful, but
e17fb72914e328f962e5df1bf88f301c0e7fa6e1Lennart Poettering WITHOUT ANY WARRANTY; without even the implied warranty of
e17fb72914e328f962e5df1bf88f301c0e7fa6e1Lennart Poettering MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
e17fb72914e328f962e5df1bf88f301c0e7fa6e1Lennart Poettering General Public License for more details.
e17fb72914e328f962e5df1bf88f301c0e7fa6e1Lennart Poettering You should have received a copy of the GNU General Public License
e17fb72914e328f962e5df1bf88f301c0e7fa6e1Lennart Poettering along with systemd; If not, see <http://www.gnu.org/licenses/>.
e17fb72914e328f962e5df1bf88f301c0e7fa6e1Lennart Poettering <refentryinfo>
e17fb72914e328f962e5df1bf88f301c0e7fa6e1Lennart Poettering </authorgroup>
e17fb72914e328f962e5df1bf88f301c0e7fa6e1Lennart Poettering </refentryinfo>
e17fb72914e328f962e5df1bf88f301c0e7fa6e1Lennart Poettering <refentrytitle>os-release</refentrytitle>
e17fb72914e328f962e5df1bf88f301c0e7fa6e1Lennart Poettering <refpurpose>Operating system identification</refpurpose>
e17fb72914e328f962e5df1bf88f301c0e7fa6e1Lennart Poettering <refsynopsisdiv>
e17fb72914e328f962e5df1bf88f301c0e7fa6e1Lennart Poettering <para><filename>/etc/os-release</filename></para>
e17fb72914e328f962e5df1bf88f301c0e7fa6e1Lennart Poettering </refsynopsisdiv>
e17fb72914e328f962e5df1bf88f301c0e7fa6e1Lennart Poettering <para>The <filename>/etc/os-release</filename> file
e17fb72914e328f962e5df1bf88f301c0e7fa6e1Lennart Poettering contains operating system identification data.</para>
e17fb72914e328f962e5df1bf88f301c0e7fa6e1Lennart Poettering <para>The basic file format of
e17fb72914e328f962e5df1bf88f301c0e7fa6e1Lennart Poettering newline-separated list of environment-like
e17fb72914e328f962e5df1bf88f301c0e7fa6e1Lennart Poettering shell-compatible variable assignments. It is possible
e17fb72914e328f962e5df1bf88f301c0e7fa6e1Lennart Poettering to source the configuration from shell scripts,
e17fb72914e328f962e5df1bf88f301c0e7fa6e1Lennart Poettering however, beyond mere variable assignments no shell
e17fb72914e328f962e5df1bf88f301c0e7fa6e1Lennart Poettering features are supported, allowing applications to read
e17fb72914e328f962e5df1bf88f301c0e7fa6e1Lennart Poettering the file without implementing a shell compatible
e17fb72914e328f962e5df1bf88f301c0e7fa6e1Lennart Poettering execution engine.</para>
e17fb72914e328f962e5df1bf88f301c0e7fa6e1Lennart Poettering <para><filename>/etc/os-release</filename> contains
e17fb72914e328f962e5df1bf88f301c0e7fa6e1Lennart Poettering data that is defined by the operating system vendor
e17fb72914e328f962e5df1bf88f301c0e7fa6e1Lennart Poettering and should not be changed by the administrator.</para>
e17fb72914e328f962e5df1bf88f301c0e7fa6e1Lennart Poettering <para>Depending on the operating system other
e17fb72914e328f962e5df1bf88f301c0e7fa6e1Lennart Poettering configuration files might be checked for OS
e17fb72914e328f962e5df1bf88f301c0e7fa6e1Lennart Poettering identification as well, however only as
e17fb72914e328f962e5df1bf88f301c0e7fa6e1Lennart Poettering fallback.</para>
e17fb72914e328f962e5df1bf88f301c0e7fa6e1Lennart Poettering <para>The following OS identifications parameters may be set using
e17fb72914e328f962e5df1bf88f301c0e7fa6e1Lennart Poettering <filename>/etc/os-release</filename>:</para>
e17fb72914e328f962e5df1bf88f301c0e7fa6e1Lennart Poettering <variablelist>
e17fb72914e328f962e5df1bf88f301c0e7fa6e1Lennart Poettering <varlistentry>
e17fb72914e328f962e5df1bf88f301c0e7fa6e1Lennart Poettering the operating system, without a
e17fb72914e328f962e5df1bf88f301c0e7fa6e1Lennart Poettering version string, and not necessarily
e17fb72914e328f962e5df1bf88f301c0e7fa6e1Lennart Poettering suitable for presentation to the
e17fb72914e328f962e5df1bf88f301c0e7fa6e1Lennart Poettering user. If not set defaults to
e17fb72914e328f962e5df1bf88f301c0e7fa6e1Lennart Poettering <literal>NAME="Debian
e17fb72914e328f962e5df1bf88f301c0e7fa6e1Lennart Poettering </varlistentry>
e17fb72914e328f962e5df1bf88f301c0e7fa6e1Lennart Poettering <varlistentry>
e17fb72914e328f962e5df1bf88f301c0e7fa6e1Lennart Poettering the operating system version,
e17fb72914e328f962e5df1bf88f301c0e7fa6e1Lennart Poettering excluding any name information and
e17fb72914e328f962e5df1bf88f301c0e7fa6e1Lennart Poettering suitable for presentation to the
e17fb72914e328f962e5df1bf88f301c0e7fa6e1Lennart Poettering user. Example:
e17fb72914e328f962e5df1bf88f301c0e7fa6e1Lennart Poettering <literal>VERSION="15
e17fb72914e328f962e5df1bf88f301c0e7fa6e1Lennart Poettering </varlistentry>
e17fb72914e328f962e5df1bf88f301c0e7fa6e1Lennart Poettering <varlistentry>
e17fb72914e328f962e5df1bf88f301c0e7fa6e1Lennart Poettering identifying the operating system,
e17fb72914e328f962e5df1bf88f301c0e7fa6e1Lennart Poettering excluding any version information and
e17fb72914e328f962e5df1bf88f301c0e7fa6e1Lennart Poettering suitable for processing by scripts. If
e17fb72914e328f962e5df1bf88f301c0e7fa6e1Lennart Poettering not set defaults to
e17fb72914e328f962e5df1bf88f301c0e7fa6e1Lennart Poettering <literal>ID=fedora</literal>.</para></listitem>
e17fb72914e328f962e5df1bf88f301c0e7fa6e1Lennart Poettering </varlistentry>
e17fb72914e328f962e5df1bf88f301c0e7fa6e1Lennart Poettering <varlistentry>
e17fb72914e328f962e5df1bf88f301c0e7fa6e1Lennart Poettering <term><varname>VERSION_ID=</varname></term>
e17fb72914e328f962e5df1bf88f301c0e7fa6e1Lennart Poettering (mostly numeric) identifying the
e17fb72914e328f962e5df1bf88f301c0e7fa6e1Lennart Poettering operating system version, excluding
e17fb72914e328f962e5df1bf88f301c0e7fa6e1Lennart Poettering any name information and suitable for
e17fb72914e328f962e5df1bf88f301c0e7fa6e1Lennart Poettering processing by scripts. Example:
e17fb72914e328f962e5df1bf88f301c0e7fa6e1Lennart Poettering <literal>VERSION_ID=15</literal>.</para></listitem>
e17fb72914e328f962e5df1bf88f301c0e7fa6e1Lennart Poettering </varlistentry>
e17fb72914e328f962e5df1bf88f301c0e7fa6e1Lennart Poettering <varlistentry>
e17fb72914e328f962e5df1bf88f301c0e7fa6e1Lennart Poettering <term><varname>PRETTY_NAME=</varname></term>
e17fb72914e328f962e5df1bf88f301c0e7fa6e1Lennart Poettering system name in a format suitable for
e17fb72914e328f962e5df1bf88f301c0e7fa6e1Lennart Poettering presentation to the user. May or may
e17fb72914e328f962e5df1bf88f301c0e7fa6e1Lennart Poettering not contain an OS version of some
e17fb72914e328f962e5df1bf88f301c0e7fa6e1Lennart Poettering kind, as suitable. If not set defaults
e17fb72914e328f962e5df1bf88f301c0e7fa6e1Lennart Poettering <literal>PRETTY_NAME=Fedora 15
e17fb72914e328f962e5df1bf88f301c0e7fa6e1Lennart Poettering </varlistentry>
e17fb72914e328f962e5df1bf88f301c0e7fa6e1Lennart Poettering <varlistentry>
e17fb72914e328f962e5df1bf88f301c0e7fa6e1Lennart Poettering <term><varname>ANSI_COLOR=</varname></term>
e17fb72914e328f962e5df1bf88f301c0e7fa6e1Lennart Poettering presentation color when showing the
e17fb72914e328f962e5df1bf88f301c0e7fa6e1Lennart Poettering distribution name on the console. This
e17fb72914e328f962e5df1bf88f301c0e7fa6e1Lennart Poettering should be specified as string suitable
e17fb72914e328f962e5df1bf88f301c0e7fa6e1Lennart Poettering for inclusion in the ESC [ m
e17fb72914e328f962e5df1bf88f301c0e7fa6e1Lennart Poettering graphical rendition. Example:
e17fb72914e328f962e5df1bf88f301c0e7fa6e1Lennart Poettering </varlistentry>
e17fb72914e328f962e5df1bf88f301c0e7fa6e1Lennart Poettering </variablelist>
e17fb72914e328f962e5df1bf88f301c0e7fa6e1Lennart Poettering <para>If you interpreting this file from code or a
e17fb72914e328f962e5df1bf88f301c0e7fa6e1Lennart Poettering shell script, use the ID and VERSION_ID fields. When
e17fb72914e328f962e5df1bf88f301c0e7fa6e1Lennart Poettering looking for an OS indetification string for
e17fb72914e328f962e5df1bf88f301c0e7fa6e1Lennart Poettering presentation to the user use the PRETTY_STRING
e17fb72914e328f962e5df1bf88f301c0e7fa6e1Lennart Poettering <programlisting>NAME=Fedora
e17fb72914e328f962e5df1bf88f301c0e7fa6e1Lennart PoetteringVERSION=15 (Rawhide)
e17fb72914e328f962e5df1bf88f301c0e7fa6e1Lennart PoetteringPRETTY_NAME=Fedora 15 (Rawhide)
e17fb72914e328f962e5df1bf88f301c0e7fa6e1Lennart PoetteringANSI_COLOR=0;34</programlisting>
e17fb72914e328f962e5df1bf88f301c0e7fa6e1Lennart Poettering <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
e17fb72914e328f962e5df1bf88f301c0e7fa6e1Lennart Poettering <citerefentry><refentrytitle>lsb_release</refentrytitle><manvolnum>1</manvolnum></citerefentry>