Dan Price wrote:
> On Sun 27 Apr 2008 at 12:54PM, Rinaldo DiGiorgio wrote:
>   
>>>> [EMAIL PROTECTED]:~# cat /etc/motd
>>>> Sun Microsystems Inc.    SunOS 5.11    snv_86    January 2008
>>>> [EMAIL PROTECTED]:~# grep 11 /etc/motd
>>>> Sun Microsystems Inc.    SunOS 5.11    snv_86    January 2008
>>>> [EMAIL PROTECTED]:~# echo $?
>>>> 0
>>>> [EMAIL PROTECTED]:~# grep 12 /etc/motd
>>>> [EMAIL PROTECTED]:~# echo $?
>>>> 1
>>>>     
>>>>         
>>>   The analogy here isn't convincing, possibly because the pkg(1)
>>>   invocations above are a small subset of those available.  pkg
>>>   uninstall of an unknown package gives a non-zero exit status; pkg
>>>   install of an unknown package gives a non-zero exit status.  At the
>>>   completion of the pkg install invocation in both the cases above, the
>>>   requested package is actually installed.
>>>       
>
> Rinaldo,
>
> A similar command that you might use to make this test is
> 'pkg list <pkgname>' -- this does indeed return 1 if the package
> is not installed.  I think that's the most analogous to grep, and
> is the test we use in the test suite for this kind of checking.
>
>         -dp
>   
Excellent, thank you. I have put together a JSON interface  available to 
any HTTP capable client  for
remote installation of packages. I typically manage about 100 systems.  
The ability for me to install
from one server will save me quite a bit of time.  I had something 
similar with the old packaging system
but the commands were too verbose and asked too many questions. So far 
the new system is much
better for me on this issue.


Rinaldo





_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss

Reply via email to