From owner-freebsd-questions Sat Mar 20 11:24:19 1999 Delivered-To: freebsd-questions@freebsd.org Received: from pop01.globecomm.net (pop01.globecomm.net [206.253.129.185]) by hub.freebsd.org (Postfix) with ESMTP id 2628214CB0 for ; Sat, 20 Mar 1999 11:23:42 -0800 (PST) (envelope-from pmurphy@earthling.net) Received: from earthling.net (dialin77.toronto.globalserve.net [209.90.130.77]) by pop01.globecomm.net (8.9.0/8.8.0) with ESMTP id OAA02895 for ; Sat, 20 Mar 1999 14:23:07 -0500 (EST) Message-ID: <36F3F5A8.59CAF79A@earthling.net> Date: Sat, 20 Mar 1999 14:23:20 -0500 From: Paul Murphy X-Mailer: Mozilla 4.5 [en] (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: freebsd-questions@FreeBSD.ORG Subject: Re: runlevels ? References: <4.1.19990317173322.00918930@mail-r> <36F0BB50.6F2309@uk.radan.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG From Slackware Linux man page [INIT(8)]: RUNLEVELS A runlevel is a software configuration of the system which allows only a selected group of processes to exist. The processes spawned by init for each of these runlevels are defined in the /etc/inittab file. Init can be in one of eight runlevels: 0-6 and S or s. The runlevel is changed by having a privileged user run telinit, which sends appropriate signals to init, telling it which runlevel to change to. [snip] After it has spawned all of the processes specified, init waits for one of its descendant processes to die, a power- fail signal, or until it is signaled by telinit to change the system's runlevel. When one of the above three condi- tions occurs, it re-examines the /etc/inittab file. New entries can be added to this file at any time. However, init still waits for one of the above three conditions to occur. To provide for an instantaneous response, the telinit Q or q command can wake up init to re-examine the /etc/inittab file. [snip] ENVIRONMENT Init sets the following environment variables for all its children: PATH /usr/local/sbin:/sbin:/bin:/usr/sbin:/usr/bin INIT_VERSION As the name says. Useful to determine if a script runs directly from init. [note: this may be the answer to the ORIGINAL question] RUNLEVEL The current system runlevel. PREVLEVEL The previous runlevel (useful after a runlevel switch). CONSOLE The system console. This is really inherited from the kernel; however if it is not set init will set it to /dev/console by default. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message