Re: runlevel

Super User wrote:
mst wrote:

On Sat, 15 Apr 2006 13:45:16 +0200 Super User <duck7uck@xxxxxx> wrote:

using opensuse 10
my initdefault is 5,

why is this:
linux:~ # who -r
run-level 5 Apr 11 17:03 last=S
linux:~ # runlevel
N 5

So, what's your question? You're at runlevel 5.

the diff is the previous runlevel,
who -r reports S
runlevel reports N
why is this ?

What was the runlevel you ran before you went to init 5?
What would you expect to see? Have you tried running another runlevel to
see what the outcome would be? These would be things I would have done
if I were realy interested in it.

Now with some logical thinking, why do you think there is a difference
between the two outcomes.
1) who looks at who was logged in, it looks at users.
2) runlevel looks at what runlevel is run. It looks at the system.

Now deducting 2 seconds, the reason there is a difference is because the
first remembers things after a reboot and the second does not. So as
explained in the manpage it shows a N if it does not know what ran
before, because from a system point of view there was no previous
who looks at people logging in and logging out and does not understand
when or if a system reboots.

When you look at two differnt sorts of information, you can expect two
different types of outcome.

If you would have tried running a different runlevel, this would have
become apparant as well. Say you start with runlevel 5, then go to 3, it
will become
who -r :last=5 As expected
runlevel: 5 3 As expected
You then go back and see what you would have expected. At some point you
do a reboot and suddenly notice the difference. This would make you
understand that the reboot somehow wipes out the info.
Naturaly you already know what the N ment and would have come to the
same conclusion I just did. ;-)
houghi Please do not toppost
Let's not be too tough on our own ignorance. It's the thing that makes
America great. If America weren't incomparably ignorant, how could we
have tolerated the last eight years? -- Frank Zappa, in 1988