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