tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Determining if a system is in shutdown

On 08/29/2015 09:56 AM, Christos Zoulas wrote:
> In article <>,
> Tilman Kranz  <> wrote:
>> Hello,
>> for a patch for "nodm" (a lightweight X session manager), I try
>> to find out how to determine if a system is currently in shutdown.
>> The intention is to prevent "nodm" from restarting an X session
>> that caught a SIGTERM while the system is in shutdown.
>> [...utmp code example skipped...]
>> The question:
>> My question is if there is an analogous way in BSD to determine
>> if a system shutdown is currently scheduled.
> Yes, the convention is that if _PATH_NOLOGIN exists, you should not
> allow logins.
> christos

That fully applies to nodm, because nodm performs autologin.

The version of nodm I work with (0.11) does not consider any
"nologin" file.

I will make sure that it performs this check where applicable.

Thank you and kind regards,

Home | Main Index | Thread Index | Old Index