* [gentoo-user] Determining the current runlevel
@ 2005-07-19 9:32 Neil Bothwick
2005-07-19 10:03 ` Ow Mun Heng
2005-07-19 10:21 ` [gentoo-user] " Remy Blank
0 siblings, 2 replies; 13+ messages in thread
From: Neil Bothwick @ 2005-07-19 9:32 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 396 bytes --]
I'm sure I've seen this mentioned before, but can't find it. I need a way
to find the current Gentoo runlevel (not the numeric one) in a script. I
can check the level booted by grepping /proc/cmdline, but that fails if
the runlevel was subsequently changed with rc.
--
Neil Bothwick
Don't forget that MS-Windows is just a temporary workaround until you can
switch to a GNU system.
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [gentoo-user] Determining the current runlevel
2005-07-19 9:32 [gentoo-user] Determining the current runlevel Neil Bothwick
@ 2005-07-19 10:03 ` Ow Mun Heng
2005-07-19 11:09 ` Neil Bothwick
2005-07-19 10:21 ` [gentoo-user] " Remy Blank
1 sibling, 1 reply; 13+ messages in thread
From: Ow Mun Heng @ 2005-07-19 10:03 UTC (permalink / raw
To: gentoo-user
On Tue, 2005-07-19 at 10:32 +0100, Neil Bothwick wrote:
> I'm sure I've seen this mentioned before, but can't find it. I need a way
> to find the current Gentoo runlevel (not the numeric one) in a script. I
> can check the level booted by grepping /proc/cmdline, but that fails if
> the runlevel was subsequently changed with rc.
not sure if executing
$runlevel
N 3
helps?
--
Ow Mun Heng
Gentoo/Linux on DELL D600 1.4Ghz 1.5GB RAM
98% Microsoft(tm) Free!!
Neuromancer 18:03:34 up 2 days, 1:11, 9 users, load average: 2.53, 1.24,
1.01
--
gentoo-user@gentoo.org mailing list
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [gentoo-user] Determining the current runlevel
2005-07-19 10:03 ` Ow Mun Heng
@ 2005-07-19 11:09 ` Neil Bothwick
2005-07-19 11:30 ` Richard Brown
0 siblings, 1 reply; 13+ messages in thread
From: Neil Bothwick @ 2005-07-19 11:09 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 652 bytes --]
On Tue, 19 Jul 2005 18:03:53 +0800, Ow Mun Heng wrote:
> > I'm sure I've seen this mentioned before, but can't find it. I need a
> > way to find the current Gentoo runlevel (not the numeric one) in a
> > script. I can check the level booted by grepping /proc/cmdline, but
> > that fails if the runlevel was subsequently changed with rc.
>
> not sure if executing
>
> $runlevel
> N 3
>
> helps?
It doesn't, because the numeric runlevel is always three (unless you've
messed with /etc/inittab). I need the Gentoo runlevel; default,
nonetwork etc.
--
Neil Bothwick
Adolescence, n.: The stage between puberty and adultery.
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [gentoo-user] Determining the current runlevel
2005-07-19 11:09 ` Neil Bothwick
@ 2005-07-19 11:30 ` Richard Brown
2005-07-19 12:47 ` Neil Bothwick
0 siblings, 1 reply; 13+ messages in thread
From: Richard Brown @ 2005-07-19 11:30 UTC (permalink / raw
To: gentoo-user
On 19/07/05, Neil Bothwick <neil@digimed.co.uk> wrote:
> On Tue, 19 Jul 2005 18:03:53 +0800, Ow Mun Heng wrote:
>
> > > I'm sure I've seen this mentioned before, but can't find it. I need a
> > > way to find the current Gentoo runlevel (not the numeric one) in a
> > > script. I can check the level booted by grepping /proc/cmdline, but
> > > that fails if the runlevel was subsequently changed with rc.
rc-status -nc | head -n 1 | cut -c11-
HTH
--
Richard Brown
--
gentoo-user@gentoo.org mailing list
^ permalink raw reply [flat|nested] 13+ messages in thread
* [gentoo-user] Re: Determining the current runlevel
2005-07-19 9:32 [gentoo-user] Determining the current runlevel Neil Bothwick
2005-07-19 10:03 ` Ow Mun Heng
@ 2005-07-19 10:21 ` Remy Blank
2005-07-19 11:29 ` Neil Bothwick
1 sibling, 1 reply; 13+ messages in thread
From: Remy Blank @ 2005-07-19 10:21 UTC (permalink / raw
To: gentoo-user
Neil Bothwick wrote:
> I'm sure I've seen this mentioned before, but can't find it. I need a way
> to find the current Gentoo runlevel (not the numeric one) in a script. I
> can check the level booted by grepping /proc/cmdline, but that fails if
> the runlevel was subsequently changed with rc.
# cat /var/lib/init.d/softlevel
default
HTH.
-- Remy
Remove underscore and suffix in reply address for a timely response.
--
gentoo-user@gentoo.org mailing list
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [gentoo-user] Re: Determining the current runlevel
2005-07-19 10:21 ` [gentoo-user] " Remy Blank
@ 2005-07-19 11:29 ` Neil Bothwick
2005-07-19 12:14 ` YoYo Siska
0 siblings, 1 reply; 13+ messages in thread
From: Neil Bothwick @ 2005-07-19 11:29 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 196 bytes --]
On Tue, 19 Jul 2005 12:21:25 +0200, Remy Blank wrote:
> # cat /var/lib/init.d/softlevel
> default
That's it! Many thanks.
--
Neil Bothwick
EMail - garbage at the speed of light.
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [gentoo-user] Re: Determining the current runlevel
2005-07-19 11:29 ` Neil Bothwick
@ 2005-07-19 12:14 ` YoYo Siska
2005-07-19 20:14 ` michael
0 siblings, 1 reply; 13+ messages in thread
From: YoYo Siska @ 2005-07-19 12:14 UTC (permalink / raw
To: gentoo-user
Neil Bothwick wrote:
> On Tue, 19 Jul 2005 12:21:25 +0200, Remy Blank wrote:
>
>
>># cat /var/lib/init.d/softlevel
>>default
>
>
> That's it! Many thanks.
I usualy do:
source /etc/conf.d/rc
rl=`cat "$svcdir/softlevel"`
just to be sure... ;)
or directly
source /sbin/functions.sh
rl=`cat "$svcdir/softlevel"`
functions.sh do source the config and have some functions that can be
handy... (einfo, ewarn, eeror to begin with...)
--
gentoo-user@gentoo.org mailing list
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [gentoo-user] Re: Determining the current runlevel
2005-07-19 12:14 ` YoYo Siska
@ 2005-07-19 20:14 ` michael
2005-07-20 13:26 ` A. R.
0 siblings, 1 reply; 13+ messages in thread
From: michael @ 2005-07-19 20:14 UTC (permalink / raw
To: gentoo-user
On Tue, 19 Jul 2005, YoYo Siska wrote:
> Neil Bothwick wrote:
>> On Tue, 19 Jul 2005 12:21:25 +0200, Remy Blank wrote:
>>
>>
>>> # cat /var/lib/init.d/softlevel
>>> default
>>
>>
>> That's it! Many thanks.
>
> I usualy do:
>
> source /etc/conf.d/rc
> rl=`cat "$svcdir/softlevel"`
>
> just to be sure... ;)
> or directly
>
> source /sbin/functions.sh
> rl=`cat "$svcdir/softlevel"`
>
> functions.sh do source the config and have some functions that can be
> handy... (einfo, ewarn, eeror to begin with...)
> --
>
But don't these just report what it would be if no on changed it? If you
force a runlevel change after the system has booted, is there any way to
find that out afterwards?
--
gentoo-user@gentoo.org mailing list
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [gentoo-user] Re: Determining the current runlevel
2005-07-19 20:14 ` michael
@ 2005-07-20 13:26 ` A. R.
2005-07-20 13:37 ` Neil Bothwick
0 siblings, 1 reply; 13+ messages in thread
From: A. R. @ 2005-07-20 13:26 UTC (permalink / raw
To: gentoo-user
Hi there,
try the command "runlevel" as root.
HTH
- AR
On 7/19/05, michael@michaelshiloh.com <michael@michaelshiloh.com> wrote:
> On Tue, 19 Jul 2005, YoYo Siska wrote:
>
> > Neil Bothwick wrote:
> >> On Tue, 19 Jul 2005 12:21:25 +0200, Remy Blank wrote:
> >>
> >>
> >>> # cat /var/lib/init.d/softlevel
> >>> default
> >>
> >>
> >> That's it! Many thanks.
> >
> > I usualy do:
> >
> > source /etc/conf.d/rc
> > rl=`cat "$svcdir/softlevel"`
> >
> > just to be sure... ;)
> > or directly
> >
> > source /sbin/functions.sh
> > rl=`cat "$svcdir/softlevel"`
> >
> > functions.sh do source the config and have some functions that can be
> > handy... (einfo, ewarn, eeror to begin with...)
> > --
> >
> But don't these just report what it would be if no on changed it? If you
> force a runlevel change after the system has booted, is there any way to
> find that out afterwards?
>
> --
> gentoo-user@gentoo.org mailing list
>
>
--
If the truth can't set you free, a lie will save you.
--
gentoo-user@gentoo.org mailing list
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [gentoo-user] Re: Determining the current runlevel
2005-07-20 13:26 ` A. R.
@ 2005-07-20 13:37 ` Neil Bothwick
2005-07-20 13:44 ` A. R.
0 siblings, 1 reply; 13+ messages in thread
From: Neil Bothwick @ 2005-07-20 13:37 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 312 bytes --]
On Wed, 20 Jul 2005 09:26:13 -0400, A. R. wrote:
> try the command "runlevel" as root.
I already said in my original post, and at least one followup, that I
need the softlevel, not the numeric level from itittab.
--
Neil Bothwick
Did you know that eskimos have 17 different words for linguist?
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [gentoo-user] Re: Determining the current runlevel
2005-07-20 13:37 ` Neil Bothwick
@ 2005-07-20 13:44 ` A. R.
2005-07-20 14:23 ` Neil Bothwick
0 siblings, 1 reply; 13+ messages in thread
From: A. R. @ 2005-07-20 13:44 UTC (permalink / raw
To: gentoo-user
Oh,
so then the subject of your original post should have read
"Determining the current softlevel".
- AR
On 7/20/05, Neil Bothwick <neil@digimed.co.uk> wrote:
> On Wed, 20 Jul 2005 09:26:13 -0400, A. R. wrote:
>
> > try the command "runlevel" as root.
>
> I already said in my original post, and at least one followup, that I
> need the softlevel, not the numeric level from itittab.
>
>
> --
> Neil Bothwick
>
> Did you know that eskimos have 17 different words for linguist?
>
>
>
--
If the truth can't set you free, a lie will save you.
--
gentoo-user@gentoo.org mailing list
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2005-07-20 14:28 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-07-19 9:32 [gentoo-user] Determining the current runlevel Neil Bothwick
2005-07-19 10:03 ` Ow Mun Heng
2005-07-19 11:09 ` Neil Bothwick
2005-07-19 11:30 ` Richard Brown
2005-07-19 12:47 ` Neil Bothwick
2005-07-19 10:21 ` [gentoo-user] " Remy Blank
2005-07-19 11:29 ` Neil Bothwick
2005-07-19 12:14 ` YoYo Siska
2005-07-19 20:14 ` michael
2005-07-20 13:26 ` A. R.
2005-07-20 13:37 ` Neil Bothwick
2005-07-20 13:44 ` A. R.
2005-07-20 14:23 ` Neil Bothwick
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox