[plt-scheme] OS version?
On Dec 9, Anton van Straaten wrote:
> Eli Barzilay wrote:
> >>Major distributions often alter uname -a to report the distro name
> >>as well as the kernel version. [...]
> >
> >
> > RedHat/Fedora don't do this.
>
> I don't know if it's better or worse than what you already have, but
> the script on this page:
>
> http://dev.i2p.net/pipermail/i2p-cvs/2004-August/003274.html
>
> ...uses a combination of "uname -a" and grepping /proc/version to
> figure out the distro (see the "osid" script).
Cute idea -- but it doesn't deal with the distro version, and it fails
for my machine (Fedora, but doesn't have "Fedora" in /proc/version so
it returns "redhat").
> One thing to note about /proc/version is that on at least some
> virtual servers, including both Virtuozzo and UML, the specified
> distribution is that of the host machine, but that's misleading for
> install purposes because the guest OS may be different.
That's not a problem -- I just needed some hack for the build script,
not for creating installers. (It's a nice idea -- have the installer
contain platform independent files in its embedded tgz, and sub
archives that have binaries for different platforms -- and when it's
run, detect the OS and unpack the right binaries.)
> There are also the following files (from
> http://www.fedoraforum.org/forum/archive/index.php/t-27768.html):
>
> Novell SuSE /etc/SuSE-release
> Red Hat /etc/redhat-release
> Fedora /etc/fedora-release
> Slackware /etc/slackware-release
> Debian /etc/debian_release
> Mandrake /etc/mandrake-release
> Yellow dog /etc/yellowdog-release
> Sun JDS /etc/sun-release
> Solaris/Sparc /etc/release
> Gentoo /etc/gentoo-release
>
> I notice that on recent Debians at least, /etc/debian_release
> doesn't exist, but /etc_debian_version does.
It would be nice if everyone would just standardize on something...
> > Actually, the problem came up with a newer Ubuntu that has
> > "testing/unstable" in [/etc/debian_version].
>
> I'm no expert, but isn't that because the current Debian stable
> release, and older releases, are the only ones with version numbers?
> I also have "testing/unstable" in my /etc/debian_release on an
> official Debian AMD64 setup (i.e. not Ubuntu). Of course,
> "testing/unstable" could mean just about anything, depending on when
> the OS was last updated.
(I'm pretty lost when it gets to such Debian technicalities...)
--
((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay:
http://www.barzilay.org/ Maze is Life!