:: Re: [DNG] dnsmasq init.d inconsiste…
Página Inicial
Delete this message
Reply to this message
Autor: Ken Dibble
Data:  
Para: dng
Assunto: Re: [DNG] dnsmasq init.d inconsistencies
> Since this is Debian Policy the init script must handle appropriately
> the case where the package has been "removed" removing non-conffiles
> of the package but not "purged" leaving the conffiles in /etc which
> includes the init script.


This is exactly my point. Not starting is the correct thing to do. Reporting no error when an error occurred is not
the right thing to do.

Any script attempting to call the dsnsmasq script fails, because the dsnmasq script returns no error even though an error occurred.

I don't know how I can be any more descriptive than this.



Repeating part of my original message:



# The following test ensures the dnsmasq service is not started, when the

# package 'dnsmasq' is removed but not purged, even if the dnsmasq-base

# package is still in place.

test -e /usr/share/dnsmasq/installed-marker || exit 0



test -x ${DAEMON} || exit 0


This is inconsistent with the documentation in start() and one could
certainly make the case that returning no error when an error has occurred is a bad thing.



I would suggest something like this:

test -e /usr/share/dnsmasq/installed-marker || (log_daemon_msg start
"installed-marker not present" && exit 2)

test -x ${DAEMON} || ( log_daemon_msg start "${DAEMON} not executable"
&& exit 2)


Regards,
Ken