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

Re: Sourcing init-functions



On 25.01.2010 09:06, Steve Langasek wrote:
> On Mon, Jan 25, 2010 at 08:50:04AM +0100, Gabor Gombas wrote:
>> On Sat, Jan 16, 2010 at 02:36:48AM -0800, Steve Langasek wrote:
> 
>>> Looks like nonsense to me.  I think you should file a bug.  For one thing,
>>> any init script that needs lsb-base (>= 3.0-6) *should depend on lsb-base
>>> (>= 3.0-6)*, not throw an error if it's not installed.
> 
>> Dependencies do not help if the package gets uninstalled but the init
>> script is not purged.
> 
> The right way to handle that is:
> 
>  [ -x /path/to/my/daemon ] || exit 0

To iterate on that: this check for the existence of the daemon should come
*before* sourcing /lib/lsb/init-functions.
This way, the init script behaves correctly even if it has been uninstalled but
not purged.

Cheers,
Michael

-- 
Why is it that all of the instruments seeking intelligent life in the
universe are pointed away from Earth?

Attachment: signature.asc
Description: OpenPGP digital signature


Reply to: