Re: How to display the linux distribution name?
From: Moe Trin (ibuprofin_at_painkiller.example.tld)
Date: 09/01/05
- Previous message: Dances With Crows: "Re: Reinstalling Package modules on Madriva 10.2 after removing gtk"
- Next in thread: Moe Trin: "Re: How to display the linux distribution name?"
- Maybe reply: Moe Trin: "Re: How to display the linux distribution name?"
- Maybe reply: Rick Moen: "Re: How to display the linux distribution name?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Wed, 31 Aug 2005 19:28:33 -0500
In the Usenet newsgroup comp.os.linux.misc, in article
<slrndh9dcb.j98.raskall@mail.ronningveien.net>, Rolf Arne Schulze wrote:
>I think I have found the distribution name in /etc/issue on most of
>the linux distros I have tried. I can't say if it is there on all of
>them, though.
As Michael mentions, that is entirely up to the administrator. An
example of how this file is created (true for most distributions) is
the mess in rc.local on Red Hat and derived systems.
R=$(cat /etc/redhat-release)
arch=$(uname -m)
a="a"
case "_$arch" in
_a*) a="an";;
_i*) a="an";;
esac
# This will overwrite /etc/issue at every boot. So, make any changes you
# want to make to /etc/issue here or you will lose them when you reboot.
echo "" > /etc/issue
echo "$R" >> /etc/issue
echo "Kernel $(uname -r) on $a $(uname -m)" >> /etc/issue
cp -f /etc/issue /etc/issue.net
echo >> /etc/issue
This is usually part of an 'if' statement that checks for the presence of
the /etc/<mumble>-release. If your admin has not changed this file, this
snippet of code runs every boot. Many admins do alter this, so that the
/etc/issue* files contain appropriate local data, SUCH AS legal warnings,
or some lame local advertisement. But then;
[compton ~]$ cat /etc/issue
Red Hat Linux release 3.0.3 (Picasso)
Kernel 1.2.13 on an i8031
[compton ~]$
if you believe that... ;-)
Old guy
- Previous message: Dances With Crows: "Re: Reinstalling Package modules on Madriva 10.2 after removing gtk"
- Next in thread: Moe Trin: "Re: How to display the linux distribution name?"
- Maybe reply: Moe Trin: "Re: How to display the linux distribution name?"
- Maybe reply: Rick Moen: "Re: How to display the linux distribution name?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]