List Info

Thread: postinstall exit status




postinstall exit status
user name
2007-09-29 08:18:43
Hello,

why does postinstall return 0 even if some check or fix
failed? I would
like to check programmatically for the success of a
postinstall check. Any
suggestions how to do it best?

Pavel

Re: postinstall exit status
country flaguser name
Germany
2007-09-29 08:18:27
On Sat, 29 Sep 2007, Pavel Cahyna wrote:
> why does postinstall return 0 even if some check or fix
failed? I would
> like to check programmatically for the success of a
postinstall check. Any
> suggestions how to do it best?

Maybe follow grep(1)'s example:
0 - no problem
1 - a check/fix failed
2 - an error ocurred

http://www.opengroup.org/onlinepubs/009695399/u
tilities/grep.html


  - Hubert

Re: postinstall exit status
user name
2007-09-29 08:45:24
On Sat, Sep 29, 2007 at 03:18:27PM +0200, Hubert Feyrer
wrote:
> On Sat, 29 Sep 2007, Pavel Cahyna wrote:
> >why does postinstall return 0 even if some check or
fix failed? I would
> >like to check programmatically for the success of a
postinstall check. Any
> >suggestions how to do it best?
> 
> Maybe follow grep(1)'s example:
> 0 - no problem
> 1 - a check/fix failed
> 2 - an error ocurred

OK. But then check will return a different code than fix,
because when
"check" fails, "fix" is needed and it
typically succeeds.

Pavel

Re: postinstall exit status
country flaguser name
Germany
2007-09-29 08:49:09
On Sat, 29 Sep 2007, Pavel Cahyna wrote:
>> Maybe follow grep(1)'s example:
>> 0 - no problem
>> 1 - a check/fix failed
>> 2 - an error ocurred
>
> OK. But then check will return a different code than
fix, because when
> "check" fails, "fix" is needed and
it typically succeeds.

I don't understand. Why do you need different codes to
indicate if a check 
or a fix failed - don't you think people remember what they
called? ;)


  - Hubert

Re: postinstall exit status
user name
2007-09-29 12:16:45
On Sat, Sep 29, 2007 at 03:49:09PM +0200, Hubert Feyrer
wrote:
> On Sat, 29 Sep 2007, Pavel Cahyna wrote:
> >>Maybe follow grep(1)'s example:
> >>0 - no problem
> >>1 - a check/fix failed
> >>2 - an error ocurred
> >
> >OK. But then check will return a different code
than fix, because when
> >"check" fails, "fix" is needed
and it typically succeeds.
> 
> I don't understand. Why do you need different codes to
indicate if a check or a fix failed - 
> don't you think people remember what they called? ;)

I don't need it but somebody maybe might not like the
inconsistent return
codes...

Pavel

[1-5]

about | contact  Other archives ( Real Estate discussion Medical topics )