changeset 1535 | a6278def0881 |
parent 1504 | 265a1d6b86bd |
child 1709 | 28592bd37c9d |
--- a/src/brand/common.ksh Wed Dec 02 11:01:27 2009 -0800 +++ b/src/brand/common.ksh Wed Dec 02 14:56:24 2009 -0700 @@ -376,3 +376,12 @@ nawk -F': ' '/SSL Cert/ {print $2; exit 0}') print $key $cert } + +# +# Handle pkg exit code. Exit 0 means Command succeeded, exit 4 means +# No changes were made - nothing to do. Any other exit code is an error. +# +pkg_err_check() { + res=$? + (( $res != 0 && $res != 4 )) && fail_fatal "$1" +}