2 ms·
I know about that, I actually hate those "underlying system" differences even more. With a bit of forethought we could have covered all the use cases and not ha
by oblio 10y ago
I know about that, I actually hate those "underlying system" differences even more. With a bit of forethought we could have covered all the use cases and not have silly things such as /etc/redhat-release vs /etc/debian_version.[1] There's no reason we couldn't have had a "/etc/distro-info" with a standardized format for writing down the distro name, the platform and the full distro version (branch/release, minor release, revision, build number, etc.). And there's thousands of these differences.
As I said: social/political/historical reasons bringing us down.
[1] I know about lsb_release, but that's an example of an afterthought, not a part of the initial design.
- 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.