Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Detecting Gentoo
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
paul138
Guru
Guru


Joined: 09 Aug 2002
Posts: 370
Location: Ottawa, ON

PostPosted: Wed Oct 23, 2002 4:09 pm    Post subject: Detecting Gentoo Reply with quote

I'm working on a script that requires it to know what linux distribution is installed. Does anyone know how to detect if Gentoo is the dist?
_________________
Talk is cheap because supply always exceeds demand.
Back to top
View user's profile Send private message
Proteus
Guru
Guru


Joined: 14 Jul 2002
Posts: 346
Location: Hamburg, Germany

PostPosted: Wed Oct 23, 2002 4:15 pm    Post subject: Reply with quote

I am not 100% sure because there are so many kernel sources offered for use with Gentoo but wouldn't the
Code:
uname -a
output help?
_________________
Greetings,
Proteus
Back to top
View user's profile Send private message
paul138
Guru
Guru


Joined: 09 Aug 2002
Posts: 370
Location: Ottawa, ON

PostPosted: Wed Oct 23, 2002 4:19 pm    Post subject: Nope Reply with quote

Unfortunatley no.

I have one system that reports 'Gentoo Linux' but the majority do not. Maybe something like RedHat's /etc/redhat-version file would be helpfull with this dist.

Anyone any more ideas?
_________________
Talk is cheap because supply always exceeds demand.
Back to top
View user's profile Send private message
pjp
Administrator
Administrator


Joined: 16 Apr 2002
Posts: 20067

PostPosted: Wed Oct 23, 2002 4:20 pm    Post subject: Reply with quote

uname -a on my machine doesn't report anything as Gentoo (vanilla kernel). I was just looking at uname -o (-o, --operating-system print the operating system), but it just outputs GNU/Linux. Is this something set in the kernel?
_________________
Quis separabit? Quo animo?
Back to top
View user's profile Send private message
paul138
Guru
Guru


Joined: 09 Aug 2002
Posts: 370
Location: Ottawa, ON

PostPosted: Wed Oct 23, 2002 4:22 pm    Post subject: Thinkl so Reply with quote

Maybe just the presence of Gentoo-specific scripts like rc-update and emerge would do it :-)

I think this is the enevitable solution.
_________________
Talk is cheap because supply always exceeds demand.
Back to top
View user's profile Send private message
pjp
Administrator
Administrator


Joined: 16 Apr 2002
Posts: 20067

PostPosted: Wed Oct 23, 2002 4:29 pm    Post subject: Reply with quote

I wonder if developers would respond to this if it were a bug (assuming there isn't currently a way to detect Gentoo's presence). Would seem a useful trinket.
_________________
Quis separabit? Quo animo?
Back to top
View user's profile Send private message
paul138
Guru
Guru


Joined: 09 Aug 2002
Posts: 370
Location: Ottawa, ON

PostPosted: Wed Oct 23, 2002 4:29 pm    Post subject: done Reply with quote

I'll post it to bugzilla.

--edited--
Done. Bug #9558
_________________
Talk is cheap because supply always exceeds demand.
Back to top
View user's profile Send private message
phong
Bodhisattva
Bodhisattva


Joined: 16 Jul 2002
Posts: 778
Location: Michigan - 15 & Ryan

PostPosted: Wed Oct 23, 2002 5:25 pm    Post subject: Reply with quote

Since there hasn't been a fork of Gentoo yet, nor another distro that uses portage, checking for critical portage files is probably sufficient. Checking certain startup scripts for specific Gentoo phrases is probably somewhat more future-proof (/sbin/rc would be a good candidate - I think it's what says "Gentoo Linux" on startup). That is, of course, until all those scripts change.
_________________
"An empty head is not really empty; it is stuffed with rubbish. Hence the difficulty of forcing anything into an empty head."
-- Eric Hoffer
Back to top
View user's profile Send private message
paul138
Guru
Guru


Joined: 09 Aug 2002
Posts: 370
Location: Ottawa, ON

PostPosted: Thu Oct 24, 2002 2:09 pm    Post subject: well Reply with quote

I suppose the /etc/gentoo-release file would help ;-) Narf! There it is.
_________________
Talk is cheap because supply always exceeds demand.
Back to top
View user's profile Send private message
pjp
Administrator
Administrator


Joined: 16 Apr 2002
Posts: 20067

PostPosted: Thu Oct 24, 2002 3:05 pm    Post subject: Re: done Reply with quote

Bug #9558

*sigh* So, you really have no way of identifying the system as Gentoo, regardless of version. The original question was never answerd, which seems to be for developers to identify the system.
_________________
Quis separabit? Quo animo?
Back to top
View user's profile Send private message
paul138
Guru
Guru


Joined: 09 Aug 2002
Posts: 370
Location: Ottawa, ON

PostPosted: Thu Oct 24, 2002 3:12 pm    Post subject: Reply with quote

Yes. 2 posts up.

Code:
cat /etc/gentoo-release


:)
_________________
Talk is cheap because supply always exceeds demand.
Back to top
View user's profile Send private message
phong
Bodhisattva
Bodhisattva


Joined: 16 Jul 2002
Posts: 778
Location: Michigan - 15 & Ryan

PostPosted: Thu Oct 24, 2002 3:13 pm    Post subject: Reply with quote

I have no /etc/gentoo-release...
_________________
"An empty head is not really empty; it is stuffed with rubbish. Hence the difficulty of forcing anything into an empty head."
-- Eric Hoffer
Back to top
View user's profile Send private message
pjp
Administrator
Administrator


Joined: 16 Apr 2002
Posts: 20067

PostPosted: Thu Oct 24, 2002 3:27 pm    Post subject: Reply with quote

phong wrote:
I have no /etc/gentoo-release...
Exactly.
_________________
Quis separabit? Quo animo?
Back to top
View user's profile Send private message
paul138
Guru
Guru


Joined: 09 Aug 2002
Posts: 370
Location: Ottawa, ON

PostPosted: Thu Oct 24, 2002 3:29 pm    Post subject: Oh Reply with quote

I see. They must have added it to the latest baselayout package,
1.8.4 here.

:roll:
_________________
Talk is cheap because supply always exceeds demand.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum