Re: syspatch(8) return values?

2020-02-10 Thread Antoine Jacoutot
On Mon, Feb 10, 2020 at 12:12:12PM -0500, Allan Streib wrote:
> Antoine Jacoutot  writes:
> 
> > "patches waiting, but didn't do anything" might be interesting (i.e
> > patches are available); dunno...
> 
> syspatch -c

?

-- 
Antoine



Re: syspatch(8) return values?

2020-02-10 Thread Adam Thompson

On 2020-02-08 06:03, Antoine Jacoutot wrote:

On Fri, Jan 31, 2020 at 09:03:59AM -0600, Adam Thompson wrote:

There's no mention of what syspatch(8) returns, in the manpage.

I can prove quickly enough that it exits(0) when there's nothing to 
do, but
I'm more interested in knowing (for automation purposes) what the 
return
values are in other circumstances, and all my systems are already up 
to

date.  Before standing up yet another system, I figured I'd ask here.

I can think of four scenarios syspatch(8) perhaps ought to 
distinguish, at

least I'm interested in these 4 outcomes:
  1. nothing to do
  2. patches waiting, but didn't do anthing
  3. patches applied
  4. something went wrong

Can I reliably tell based on $? or do I have to parse the output?


Most likely parse, yes.

"patches waiting, but didn't do anything" might be interesting (i.e 
patches are

available); dunno...


Equally if not more interesting would be "I tried to apply patches but 
failed somehow".  Which happened to me, and which is why I asked in the 
first place.
*sigh*  I'll try to propose some bad diffs [if I'm writing them, they'll 
be bad] someday soon.

-Adam



Re: syspatch(8) return values?

2020-02-10 Thread Allan Streib
Antoine Jacoutot  writes:

> "patches waiting, but didn't do anything" might be interesting (i.e
> patches are available); dunno...

syspatch -c

Allan



Re: syspatch(8) return values?

2020-02-08 Thread Antoine Jacoutot
On Fri, Jan 31, 2020 at 09:03:59AM -0600, Adam Thompson wrote:
> There's no mention of what syspatch(8) returns, in the manpage.
> 
> I can prove quickly enough that it exits(0) when there's nothing to do, but
> I'm more interested in knowing (for automation purposes) what the return
> values are in other circumstances, and all my systems are already up to
> date.  Before standing up yet another system, I figured I'd ask here.
> 
> I can think of four scenarios syspatch(8) perhaps ought to distinguish, at
> least I'm interested in these 4 outcomes:
>   1. nothing to do
>   2. patches waiting, but didn't do anthing
>   3. patches applied
>   4. something went wrong
> 
> Can I reliably tell based on $? or do I have to parse the output?

Most likely parse, yes.

"patches waiting, but didn't do anything" might be interesting (i.e patches are
available); dunno...

-- 
Antoine



syspatch(8) return values?

2020-01-31 Thread Adam Thompson

There's no mention of what syspatch(8) returns, in the manpage.

I can prove quickly enough that it exits(0) when there's nothing to do, 
but I'm more interested in knowing (for automation purposes) what the 
return values are in other circumstances, and all my systems are already 
up to date.  Before standing up yet another system, I figured I'd ask 
here.


I can think of four scenarios syspatch(8) perhaps ought to distinguish, 
at least I'm interested in these 4 outcomes:

  1. nothing to do
  2. patches waiting, but didn't do anthing
  3. patches applied
  4. something went wrong

Can I reliably tell based on $? or do I have to parse the output?

Thanks,
-Adam