[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: LSB init scripts and NETWORKING=no && exit 0



Ville Skyttä (ville skytta iki fi) said: 
> One more question related to LSB init scripts:
> 
> A commonly found current approach in init scripts for services that require 
> networking to be up is:
> 
>     # Source networking configuration.
>     . /etc/sysconfig/network
>     # Check that networking is up.
>     [ "$NETWORKING" = "no" ] && exit 0
> 
> Silently exiting with 0 no matter which action was requested does not look 
> like something expected of LSB compliant init scripts.
> 
> Actually, all of 1) silent exit and 2) the zero exit value and 3) the way "is 
> networking up?" is checked seem questionable to me.  Anyone have ideas for 
> better approaches to this?

NETWORKING=no means 'networking has never been configured on this box'. Frankly,
I'd nuke the whole section - it's rather pointless, and will not be set on
any normal machine.

(The comment is misleading.)

Bill


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]