Hi Joey,

On Sat, Jun 11, 2011 at 12:14:47PM -0400, Joey Hess wrote:
> Helmut Grohne wrote:
> > In any case it would not hurt if debhelper would support the LSB exit
> > codes. This could be done for instance by treating various exit codes as
> > if they were 0.
> 
> debhelper generates a postinst that runs update-rc.d. Reassigning.

Are you sure?

The failing code from my example nflogipac.postinst tells me that it was
added by dh_installinit:

| # Automatically added by dh_installinit
| if [ -x "/etc/init.d/nflogipac" ]; then
|       update-rc.d nflogipac defaults >/dev/null
|       if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then
|               invoke-rc.d nflogipac start || exit $?
|       else
|               /etc/init.d/nflogipac start || exit $?
|       fi
| fi
| # End automatically added section

A failure from the update-rc.d cannot make postinst fail, because the
exit code is not checked. So when the initscript returns 6 invoke-rc.d
(correctly?) passes on this value and makes the postinst fail. So in my
view the reason for a postinst failure is unrelated to update-rc.d. Can
you explain your reasoning?

Also you seem to have omitted the reassigning part. Was this
intentional?

Helmut



-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to