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

Re: sanity check in init.d



>> "SG" == Steve Greenland <stevegr@debian.org> writes:

SG> On 11-Jan-99, 16:11 (CST), Martin Bialasinski <martin@internet-treff.uni-koeln.de> wrote: 
 
>> Maybe it should do a 
>> 
>> || echo "Not $1 ing $DAEMON. There are just the conffiles left." &&
>> exit 
>> 
>> or such. I have to think about it.
>> 
>> After all, why should it not give the reason it doesn't fulfil the
>> duty it should (when the init.d script is called).

SG> Because it didn't fail? Because the init script has no duty for
SG> state you are discussion?

There is a script in init.d. If I call init.d/foo start, I expect it
to start a specific daemon/service

SG> If you removed (but did not purge) a demon, why would you expect
SG> it to start?

This looks obvious to you, but dselect only does a --remove, not a
purge. So if you take a look at init.d/ after two months, it may be
difficult to say which script acually does something and which is a
leftover conffile. 

The best solution would be to move them to init.d/inactive, but this
is not possible due to technical reasons.

SG> If you don't expect it to start, why is the fact that it didn't
SG> start require an error message?

_You_ don't expect it to do something, because you know it is just a
leftover conffile. Its shere existence in init.d does indicate
something else. This is why this test -x $DAEMON is needed at all.

SG> Daemons *should* (I think) log their startup (or failure to do so)
SG> in /var/log/daemon.log (or whereever daemon.* is configured to
SG> log).

Yes, Shaul also pointed this out. I had the analogy of usual commands
in mind (no output = no error).

SG> Logging *incorrect* failure messages is worse than useless.

If there is a test for "only conffiles left" possible, it is
preferred. The message only incorrect, if you fumble with the daemon
binary.  

Some time ago, the xinetd (or portmapper, I do not remember for sure)
binary moved. Unfortunately, in the init.d script, the DAEMON did not
change. Thous we got many confused users, because they did not see any 
error message.

Yes, the error message would be wrong, so let's think about a way to
do it better.

Thanks for you input.

Ciao,
	Martin


Reply to: