Add SUM sysctl

Daniel O'Connor doconnor at gsoft.com.au
Fri Apr 15 16:12:36 UTC 2011


On 15/04/2011, at 17:49, rank1seeker at gmail.com wrote:
>> On 15/04/2011, at 17:03, rank1seeker at 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








More information about the freebsd-hackers mailing list