Re: postinst script
On Tue, Sep 7, 2010 at 9:04 PM, Zvi Dubitzky <DUBI@il.ibm.com> wrote:
> I have a command line in postinst script of a package that works ok
> outside a package install context .
> one line is causing an error :
> cat /proc/file | grep XY > file
> without the grep - no error
> with the grep the postinstall terminates with error(below) .
> dpkg: error processing <package>(--install):
> subprocess post-installation script returned error exit status 1
> Errors were encountered while processing:
> Any idea why or limitations of postinst script
That's because grep does not match "XY" in /proc/file and returns with
an error code - 1 (0 would be a success).
At the same time, you probably have "set -e" somewhere at the
beginning of your script - and this is causing a script to stop (quit)
as soon as any command fails (returns with an error code).