View previous topic :: View next topic |
Author |
Message |
paul138 Guru
Joined: 09 Aug 2002 Posts: 370 Location: Ottawa, ON
|
Posted: Wed Oct 23, 2002 4:09 pm Post subject: Detecting Gentoo |
|
|
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 |
|
|
Proteus Guru
Joined: 14 Jul 2002 Posts: 346 Location: Hamburg, Germany
|
Posted: Wed Oct 23, 2002 4:15 pm Post subject: |
|
|
I am not 100% sure because there are so many kernel sources offered for use with Gentoo but wouldn't the output help? _________________ Greetings,
Proteus |
|
Back to top |
|
|
paul138 Guru
Joined: 09 Aug 2002 Posts: 370 Location: Ottawa, ON
|
Posted: Wed Oct 23, 2002 4:19 pm Post subject: Nope |
|
|
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 |
|
|
pjp Administrator
Joined: 16 Apr 2002 Posts: 20067
|
Posted: Wed Oct 23, 2002 4:20 pm Post subject: |
|
|
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 |
|
|
paul138 Guru
Joined: 09 Aug 2002 Posts: 370 Location: Ottawa, ON
|
Posted: Wed Oct 23, 2002 4:22 pm Post subject: Thinkl so |
|
|
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 |
|
|
pjp Administrator
Joined: 16 Apr 2002 Posts: 20067
|
Posted: Wed Oct 23, 2002 4:29 pm Post subject: |
|
|
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 |
|
|
paul138 Guru
Joined: 09 Aug 2002 Posts: 370 Location: Ottawa, ON
|
Posted: Wed Oct 23, 2002 4:29 pm Post subject: done |
|
|
I'll post it to bugzilla.
--edited--
Done. Bug #9558 _________________ Talk is cheap because supply always exceeds demand. |
|
Back to top |
|
|
phong Bodhisattva
Joined: 16 Jul 2002 Posts: 778 Location: Michigan - 15 & Ryan
|
Posted: Wed Oct 23, 2002 5:25 pm Post subject: |
|
|
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 |
|
|
paul138 Guru
Joined: 09 Aug 2002 Posts: 370 Location: Ottawa, ON
|
Posted: Thu Oct 24, 2002 2:09 pm Post subject: well |
|
|
I suppose the /etc/gentoo-release file would help Narf! There it is. _________________ Talk is cheap because supply always exceeds demand. |
|
Back to top |
|
|
pjp Administrator
Joined: 16 Apr 2002 Posts: 20067
|
Posted: Thu Oct 24, 2002 3:05 pm Post subject: Re: done |
|
|
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 |
|
|
paul138 Guru
Joined: 09 Aug 2002 Posts: 370 Location: Ottawa, ON
|
Posted: Thu Oct 24, 2002 3:12 pm Post subject: |
|
|
Yes. 2 posts up.
Code: | cat /etc/gentoo-release |
_________________ Talk is cheap because supply always exceeds demand. |
|
Back to top |
|
|
phong Bodhisattva
Joined: 16 Jul 2002 Posts: 778 Location: Michigan - 15 & Ryan
|
Posted: Thu Oct 24, 2002 3:13 pm Post subject: |
|
|
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 |
|
|
pjp Administrator
Joined: 16 Apr 2002 Posts: 20067
|
Posted: Thu Oct 24, 2002 3:27 pm Post subject: |
|
|
phong wrote: | I have no /etc/gentoo-release... | Exactly. _________________ Quis separabit? Quo animo? |
|
Back to top |
|
|
paul138 Guru
Joined: 09 Aug 2002 Posts: 370 Location: Ottawa, ON
|
Posted: Thu Oct 24, 2002 3:29 pm Post subject: Oh |
|
|
I see. They must have added it to the latest baselayout package,
1.8.4 here.
_________________ Talk is cheap because supply always exceeds demand. |
|
Back to top |
|
|
|