login bug? Fix?

walter harms wharms at bfs.de
Fri Nov 7 18:23:16 UTC 2008



Cathey, Jim schrieb:
>> i am sorry for my stupid question but ...
>> according to sources in the internet login should test for /etc/nologin
>> and die if exists and you are not root.
>> so i do not understand why someone may want to read it content.
> 
> The purpose is to put a special message in it, such as:
> "System down due to unfriendly Gnomes.  It will be back up
>  at approximately 5:00 PM EST" or some such helpful thing.
> If you have no special message, the system supplies a default.
> 

mmh, my getty does automatically "clear the screen", what ever you msg was; it is gone.

> Once Upon a Time, in a career far away, we had several login
> programs, they all operated in this way.
> 

e.g. the version i use does not honor /etc/nologin at all.

>> IMHO the line
>> puts("\r\nSystem closed for routine maintenance\r");
>> could be printed always. Not only will it save an if()
>> but also remind root that /etc/nologin is still present.
> 
> And, let us say, your system was operated by the militantly French?
> They might wish the message to NOT be in English, for example.
> The logins I was familiar with would suppress the standard
> message if you supplied a custom one.
> 

no problem, busybox does not provide i18n :).


I think we can leave the design to denys. like
* reading/printing /etc/nologin or no
* default msg                   or only file
* default msg for everyone      or only root or only non-root

did i miss something ? i hope not.

re,
 wh









More information about the busybox mailing list