multi/single-user mode flag?

Larry Dighera root at conexch.UUCP
Mon May 16 06:03:54 AEST 1988


In article <243 at oha.UUCP> tony at oha.UUCP (Tony Olekshy) writes:
>In <3595 at psuvax1.psu.edu> okunewck at gondor.cs.psu.edu (Phil OKunewick) writes:
>>
>> Therefore, I want something that will tell my operator "Do not do it this
>> way you fool" if he tries to dump in multi-user mode.
>
>We are running Xenix V here, and Xenix V uses /.profile before $HOME/.profile

I think Tony means /etc/profile not /.profile.  /.profile is traditionally
root's $HOME/.profile.

>only when starting the top-level single-user-mode sh.  I have placed:
>
>			SU_MODE=1; export SU_MODE
>
>in /.profile only, so I can always determine if I am in single user mode just
>by examining "$SU_MODE".  If your system lets you determine if you are in
>single user mode during the shell startup script then you can use this too.

What happens when the 'init s' or 'init 1' is issued?  I don't think Tony's
fix is general enough for Phil's  problem.

The normal way for a Sys V user to determine which run level state the system 
is in, is to do a 'who -r'.  Surely this could be exploited for Phil's 
purpose, although his original article didn't indicate what version of Unix
is being run at his site.  Who's -r option isn't supported yet in SCO's Xenix, but should 
be soon.

Hope this helps.
 
Larry Dighera

-- 
USPS: The Consultants' Exchange, PO Box 12100, Santa Ana, CA  92712
TELE: (714) 842-6348: BBS (N81); (714) 842-5851: Xenix guest account (E71)
UUCP: conexch Any ACU 2400 17148425851 ogin:-""-ogin:-""-ogin: nuucp
UUCP: ...!ucbvax!ucivax!icnvax!conexch!root || ...!trwrb!ucla-an!conexch!root



More information about the Comp.unix.xenix mailing list