Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!wuarchive!rex!samsung!sol.ctr.columbia.edu!cica!iuvax!ux1.cso.uiuc.edu!midway!msuinfo!news From: waldis@eecae.msu.edu (Andrew T Waldis) Newsgroups: comp.unix.xenix Subject: Problems shutting down XENIX from background. Message-ID: <1990Aug28.155608.17543@msuinfo.cl.msu.edu> Date: 28 Aug 90 15:56:08 GMT Sender: news@msuinfo.cl.msu.edu Organization: Michigan State University, College of Engineering Lines: 17 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@frith.egr.msu.edu