UNIXPC operating sans run-level; HOW?

Jim Webb jrw at mtune.ATT.COM
Tue Dec 19 08:15:00 AEST 1989


In article <361 at heurikon.UUCP>, dklann at heurikon.UUCP (David Klann) writes:
> In article <25060 at cup.portal.com> thad at cup.portal.com (Thad P Floryan) writes:
> >Anyone ever see UNIX operating withOUT being in a run-level?  Seriously.
> 
> I have seen this kind of thing before too!  I'm quite sure that the
> missing run level means that the /etc/utmp file was messed up.

Correct.  "who -r" just looks for an entry in /etc/utmp....

> I have no idea where the display of shell environment is coming from.
> Maybe there is something in /bin/ksh or /bin/sh that spits it out for
> some reason?!?

If who -r does not find such an entry, it does not print anything.
So, if somewhere in an rc-type shell script, someone says:

		set `who -r`

the set command will be run WITHOUT any arguments, and will thus
print out the environment instead of setting the positional parameters
to the output of the who -r command.  Saying

		set - `who -r`

will stop the environment from being printed, but won't do much for
the script relying on $7 or whatever for the run-level :-)

-- 
Jim Webb                "Out of Phase -- Get Help"               att!mtune!jrw
#include <std/disclaimer.h>                                  jrw at mtune.att.com



More information about the Comp.sys.att mailing list