Xref: utzoo comp.unix.questions:30740 comp.unix.misc:1365 comp.unix.sysv386:7321 Newsgroups: comp.unix.questions,comp.unix.misc,comp.unix.sysv386 Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!ispd-newsserver!ism.isc.com!ico!rcd From: rcd@ico.isc.com (Dick Dunn) Subject: Re: Current Run-Level: How can you tell? Message-ID: <1991Apr25.172929.2492@ico.isc.com> Keywords: init run level Organization: Interactive Systems Corporation, Boulder, CO References: <1991Apr23.024433.10460@srwic.UUCP> <599@fciva.FRANKCAP.COM> Date: Thu, 25 Apr 1991 17:29:29 GMT dag@fciva.FRANKCAP.COM (Daniel A. Graifer) writes: > It may depend on your version of unix, but in my port of SysV 3.1.2 > "who -r" reports various things about init including the current run > level... This is a dependable SysVism. > I don't know how you would do it from 'c'. See utmp.h. If the ut_type field is RUN_LVL, the string "run-level n" where n is the current run level, is in the ut_line field. -- Dick Dunn rcd@ico.isc.com -or- ico!rcd Boulder, CO (303)449-2870 ...While you were reading this, Motif grew by another kilobyte.