Problems shutting down XENIX from background.
Andrew T Waldis
waldis at eecae.msu.edu
Wed Aug 29 01:56:08 AEST 1990
I am trying to write a background process to periodically monitor a
set of conditions and shutdown the system if certain conditions become
true.
The background process is started at system initialization from the
directory /etc/rc.d/7. When it needs to shutdown the system it does a
system( "shutdown" ). The problem is that the shutdown script includes a
call to "who am i" and expects root|sysadm|"" in $1 and tty* in $2 to
shut down the system properly. When I run "who am i" from the backgorund,
I get "0" for the username and "" for the terminal.
Does anyone know a way to get "who am i" to return root|sysadmin|"" for
the username and tty* for the terminal when run from a background process?
I do not want to have to modify the shutdown script to do this.
-------------------------------------------------------------------------
Andrew Waldis - waldis at frith.egr.msu.edu
More information about the Comp.unix.xenix
mailing list