home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / unix / internal / 1764 < prev    next >
Encoding:
Internet Message Format  |  1992-09-01  |  1.3 KB

  1. Path: sparky!uunet!mcsun!uknet!newcastle.ac.uk!turing!ncrr
  2. From: C.R.Ritson@newcastle.ac.uk (C.R. Ritson)
  3. Newsgroups: comp.unix.internals
  4. Subject: Re: looking for a way to tell a machines current state.
  5. Message-ID: <BtwC7D.5qp@newcastle.ac.uk>
  6. Date: 1 Sep 92 11:06:48 GMT
  7. References: <1992Aug12.192218.16955@sparky.imd.sterling.com> <1351@pacsoft.com> <14272@auspex-gw.auspex.com> <1359@pacsoft.com>
  8. Organization: University of Newcastle upon Tyne, UK, NE1 7RU
  9. Lines: 19
  10. Nntp-Posting-Host: turing
  11.  
  12. mike@pacsoft.com (Mike Stefanik) writes:
  13.  
  14. >Actually, there are two "runlevels" (ie: single-user, multi-user, and ...
  15. >For those desperate, you
  16. >always can resort to trickery (a quick scan through the process table ...)
  17.  
  18. >Is there a portable, consistent, bullet-proof way to check for the current
  19. >runlevel, regardless of implementation?  No.  But then it wouldn't be UNIX
  20. >if you could, now would it? :-)
  21.  
  22. What I did, as I have a machine with two hard wired terminal ports,
  23. was to look for the existance of the getty (or any other process) with
  24. tty01 (in my case) as its controling terminal. This seemed ok to me.
  25.  
  26. Chris Ritson.
  27. EMAIL: C.R.Ritson@newcastle.ac.uk       Chris Ritson,
  28. PHONE: +44 91 222 8175                  Department of Computing Science
  29. FAX  : +44 91 222 8232                  University of Newcastle upon Tyne,
  30. TELEX: uk+53654-UNINEW_G                UK, NE1 7RU
  31.