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

Re: quitting from install scripts

On Fri, Feb 23, 2001 at 01:19:21AM +0100, calvin@users.sourceforge.net wrote:

> On Thu, Feb 22, 2001 at 02:07:36PM -0500, Matt Zimmerman wrote:
> > On Tue, Feb 20, 2001 at 10:29:18PM +1100, Drew Parsons wrote:
> > > Sorry to nag.  Has anyone got an answer to this question?
> > 
> > I asked a variation on the same question on -devel a few weeks ago, and got
> > zero responses.  Aborting in the preinst is the only way to do anything
> > even close, but it makes a bit of a mess.
> If you want to quit a script, use exit. exit 0 means everything ok, any other
> value means error.  normally the exit value of the script is the value of the
> last command which was run, but to be sure to exit cleany you can add exit 0
> at the end of the script.  Nothing more should you do to 'Error unwind'
> something, the rest is done by dpkg.

Yes.  The question was not one of shell programming syntax, it was one of
Debian packaging.  If a preinst script exits with nonzero status, other
packages can be left unpacked and unconfigured, and other such unpleasantness.

 - mdz

Reply to: