Add SUM sysctl

Garrett Cooper yanegomi at gmail.com
Sat Apr 16 17:20:36 UTC 2011


On Sat, Apr 16, 2011 at 8:41 AM, Daniel O'Connor <doconnor at gsoft.com.au> wrote:
>
> On 16/04/2011, at 17:31, Freddie Cash wrote:
>>> DO YOU KNOW, what to look for, in sys that will indicate to my function,
>>> that it is in SUM?
>>
>> No network configured, no daemons running, just a single shell
>> running.  IOW, everything can be done manually in MUM to "simulate"
>> SUM.
>
> My point is that the difference is only in your brain.
>
> The kernel doesn't know the difference because there isn't one.

    Well, not from its perspective. From init's/rc's perspective,
sure.. there sort of is one.
    You could check for /var/run/dmesg.boot beforehand, but not if
you're dropping into singleuser mode from multiuser mode. You can do
some rc tricks to determine whether or not certain services have been
started to achieve whatever you want to for your scripts.
Thanks,
-Garrett


More information about the freebsd-hackers mailing list