From owner-freebsd-hackers@FreeBSD.ORG Fri Apr 15 16:12:36 2011 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 55B221065672 for ; Fri, 15 Apr 2011 16:12:36 +0000 (UTC) (envelope-from doconnor@gsoft.com.au) Received: from cain.gsoft.com.au (unknown [IPv6:2001:44b8:7c07:5581:266:e1ff:fe0c:8f16]) by mx1.freebsd.org (Postfix) with ESMTP id 6D6A98FC0A for ; Fri, 15 Apr 2011 16:12:35 +0000 (UTC) Received: from [192.168.42.215] (maarsy.rocketrange.no [128.39.153.30]) (authenticated bits=0) by cain.gsoft.com.au (8.14.4/8.14.3) with ESMTP id p3FGCRvE039812 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Sat, 16 Apr 2011 01:42:31 +0930 (CST) (envelope-from doconnor@gsoft.com.au) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: "Daniel O'Connor" In-Reply-To: <20110415.154921.875.2@DEV> Date: Fri, 15 Apr 2011 18:12:26 +0200 Content-Transfer-Encoding: 7bit Message-Id: References: <20110415.150349.671.1@DEV> <22B12EE4-AE7B-49F7-B6BA-3FE7F967F508@gsoft.com.au> <20110415.154921.875.2@DEV> To: rank1seeker@gmail.com X-Mailer: Apple Mail (2.1084) X-Spam-Score: -1.5 () BAYES_00 X-Scanned-By: MIMEDefang 2.67 on 203.31.81.10 Cc: freebsd-hackers@freebsd.org Subject: Re: Add SUM sysctl X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Apr 2011 16:12:36 -0000 On 15/04/2011, at 17:49, rank1seeker@gmail.com wrote: >> On 15/04/2011, at 17:03, rank1seeker@gmail.com wrote: >>> I would like implementation of boolean sysctl var, that would show, is > system in a single user mode. >>> I would like it from 8.3 onwards. >> >> AFAIK the kernel doesn't have a "single user" mode. >> >> It's just that when you boot into single user mode it asks you want to > run rather than starting /sbin/init. > > I see, but 'ps' shows /sbin/init as PID 1, in both SUM and MUM. > How can I fiducially ensure that I am in SUM. > On what to rely/look on. Oh oops, I guess the kernel runs init -s which then asks you.. > I wana put it in sh's function, for usage in scripts. Why? -- Daniel O'Connor software and network engineer for Genesis Software - http://www.gsoft.com.au "The nice thing about standards is that there are so many of them to choose from." -- Andrew Tanenbaum GPG Fingerprint - 5596 B766 97C0 0E94 4347 295E E593 DC20 7B3F CE8C