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

Re: dh_installinit...



On Tue, May 18, 2004 at 08:43:40AM -0700, Matt Zimmerman wrote:
> On Mon, May 10, 2004 at 04:20:18PM +0200, Thomas -Balu- Walter wrote:
> 
> > I'm not sure what would be best practice to avoid those errors, because
> > the admin might have to configure the video device first anyway (though
> > the default /dev/video0 is usually a nice guess).
> > 
> > Have an /etc/default/camsource where the admin has to enable the daemon
> > setting $START_CAMSOURCE?
> > The init script could display something like 
> > "Please configure camsource using /etc/camsource.conf and enable it in
> > /etc/default/camsource if you want to use init to start it." 
> > if not enabled...
> > 
> > Use --no-start with dh_installinit and stop the daemon manually on
> > uninstall in prerm?
> > 
> > Other?
> 
> Let it fail to start; simply don't allow this to break the postinst.

Okay, after fiddling around a little and not being sure what solution
I'd prefer I go for Matt's.

To do so I need the initscript to make a difference if the package is
called from postinst (don't exist with error status code) or not (exit
with error status code to allow an admin to script something e.g.).

My idea is to set a variable in postinst that the initscript can check.
This works fine so far, but is there an existing variable I could use
for a cleaner solution?

-- Balu



Reply to: