On 03/14/12 02:20, Ervin Yan wrote:
Hi,

Recently, we happened to find 'pkg install' totally failed due to a network 
issue, the error looks like:

==========
Framework error: code: 7 reason: Failed to connect to 156.151.58.21: Network is 
unreachable
URL: 'http://pkg.oracle.com/solaris/release/versions/0/'.
==========


So does 'pkg' command have any options to verify whether the configured 
publishers are reachable or not,
or something other issues which would cause 'pkg install' fail?

No, because it could become unreachable at any point during the operation, so checking ahead of time would be pointless.

We just want to check it in advanced, and ask user to correct the publisher 
configuration before our utility run  'pkg install' truly.

The right way to handle this is to perform the install, check the exit code, and if it isn't zero, assume failure of the operation.

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

Reply via email to