From owner-freebsd-hackers Tue Aug 29 15:31:25 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from fw.wintelcom.net (ns1.wintelcom.net [209.1.153.20]) by hub.freebsd.org (Postfix) with ESMTP id C2AFB37B9A8 for ; Tue, 29 Aug 2000 15:31:23 -0700 (PDT) Received: (from bright@localhost) by fw.wintelcom.net (8.10.0/8.10.0) id e7TMVMN28527; Tue, 29 Aug 2000 15:31:22 -0700 (PDT) Date: Tue, 29 Aug 2000 15:31:22 -0700 From: Alfred Perlstein To: James FitzGibbon Cc: hackers@FreeBSD.ORG Subject: Re: Determining multi or single user ? Message-ID: <20000829153122.E18862@fw.wintelcom.net> References: <20000828084623.C32812@targetnet.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.4i In-Reply-To: <20000828084623.C32812@targetnet.com>; from james@targetnet.com on Mon, Aug 28, 2000 at 08:46:23AM -0400 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG * James FitzGibbon [000829 15:08] wrote: > Greetings... > > Is there an standard programmatic method for determining if a FreeBSD system > is running in single or multi-user ? Sysctl doesn't seem to have a specific > entry, but I suspect that the value of other less-well defined sysctl values > might allow me to infer what I need. > > Any thoughts ? > the kernel is not really aware of the difference between single user mode and multiuser, an interesting hack might be to make init use setproctitle() to indicate whether it's in single user mode or not. does anyone know if this could cause problems? -- -Alfred Perlstein - [bright@wintelcom.net|alfred@freebsd.org] "I have the heart of a child; I keep it in a jar on my desk." To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message