<p dir="ltr">On Jun 19, 2014 2:32 AM, &quot;Miroslav Suchý&quot; &lt;<a href="mailto:msuchy@redhat.com">msuchy@redhat.com</a>&gt; wrote:<br>
&gt;<br>
&gt; On 06/10/2014 05:19 PM, Fred Smith wrote:<br>
&gt; &gt; What I&#39;m not sure of is what would be a better way for an app installer<br>
&gt; &gt; to find out which OS version it&#39;s being installed on. Can someone offer<br>
&gt; &gt; me some enlightenment<br>
&gt;<br>
&gt; /etc/os-release<br>
&gt;<br>
&gt; <a href="http://www.freedesktop.org/software/systemd/man/os-release.html">http://www.freedesktop.org/software/systemd/man/os-release.html</a></p>
<p dir="ltr">If you use Python, its standard library has a pretty good platform module for these kinds of things, which works even beyond Linux and even to somewhat old versions of distros.</p>
<p dir="ltr">Features that are introduced by systemd can&#39;t be assumed as present except on those (recent) Linux OS versions which are using systemd, and can almost be assumed absent outside the Linux world (such as Solaris, BSD, Win/Mac). A few non-systemd Linux distros do ship /etc/os-release, especially those distro preparing to adopt systemd like Debian and Ubuntu - but even there only in recent or unreleased versions.</p>

<p dir="ltr">By far the most portable platform detection system is know is GNU autoconf&#39;s config.guess, but that may be overkill. :)</p>
<p dir="ltr">- Jimmy</p>