I am writing a script which first sets a depot server, start the pkg service in 
that server. Now i am banking on the output of pkg refresh to know whether the 
pkg service has been successfully started or not. 

First i tried the return code of pkg refresh command. It  did not help since 
¨pkg refresh tries to refresh all depot server and its return code will be non 
zero even if it is unable to refresh one of the available depot servers.

Hence i tried the other way, trying to grep the depot server name and then grep 
for 'Connection refused' message from the pkg refresh output. This worked for a 
while. However 'Connection refused'  is not the only error  message that can 
come out of pkg refresh.

Is there any reliable way i can know that i have successfully started pkg 
service in remote/localhost
. Also is it possible to refresh only a particular depot server
-- 
This message posted from opensolaris.org
_______________________________________________
opensolaris-code mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/opensolaris-code

Reply via email to