2 ms·
"/etc/os-release" is present in most newer releases. Sounds exactly what you want from "/etc/distro-info"
by vamega 10y ago
"/etc/os-release" is present in most newer releases. Sounds exactly what you want from "/etc/distro-info"
- oblio 10y agoWhaddayaknow, I missed that file. Apparently it's a Freedesktop standard (https://www.freedesktop.org/software/systemd/man/os-release.html https://www.freedesktop.org/software/systemd/man/os-release....). My point still stands, something like this should have been included from the first releases of Linux distros, 20 years ago. And that was just a random example I came up with after 2 minutes of trying to prove a point. There's many, many more like it. Also, just for kicks I took at look at the spec and... 1. ANSI_COLOR is funny: > A suggested presentation color when showing the OS name on the console. This should be specified as string suitable for inclusion in the ESC [ m ANSI/ECMA-48 escape code for setting graphical rendition. This field is optional. Example: "ANSI_COLOR="0;31"" for red, or "ANSI_COLOR="1;34"" for light blue. 2. And some parts are scary: > parameters may be set using os-release Oh-oh! Everything is optional! That's really bad for a RFC.