diff options
Diffstat (limited to 'setup_native')
-rw-r--r-- | setup_native/scripts/stclient_wrapper.sh | 33 |
1 files changed, 16 insertions, 17 deletions
diff --git a/setup_native/scripts/stclient_wrapper.sh b/setup_native/scripts/stclient_wrapper.sh index 46f44dbb3..bd5234b62 100644 --- a/setup_native/scripts/stclient_wrapper.sh +++ b/setup_native/scripts/stclient_wrapper.sh @@ -4,7 +4,11 @@ # All rights reserved. # -STCLIENT=/usr/bin/stclient +if [ `uname -s` = "SunOS" ]; then + STCLIENT=/usr/bin/stclient +else + STCLIENT=/opt/sun/servicetag/bin/stclient +fi TARGET_URN= PRODUCT_NAME= @@ -30,26 +34,21 @@ do shift done -if [ -x "$STCLIENT" ]; then - INSERT="false" - - TEST=`${STCLIENT} -f -t ${TARGET_URN}` +[ -x "$STCLIENT" ] || exit 1 - if [ "${TEST}" = "No records found" ]; then - INSERT="true" - fi +TEST=`${STCLIENT} -f -t ${TARGET_URN}` || exit 1 +[ "${TEST}" = "No records found" ] || exit 0 - if [ "${INSERT}" = "true" ]; then - if [ `uname -s` = "SunOS" ]; then - uname=`uname -p` - zone="global" - if [ -x /usr/bin/zonename ]; then - zone=`/usr/bin/zonename` - fi +uname=`uname -p` +zone="global" - output=`${STCLIENT} -a -p "${PRODUCT_NAME}" -e "${PRODUCT_VERSION}" -t "${TARGET_URN}" -S "${PRODUCT_SOURCE}" -P "${PARENT_PRODUCT_NAME}" -m "Sun Microsystems, Inc." -A ${uname} -z global` - fi +if [ `uname -s` = "SunOS" ]; then + if [ -x /usr/bin/zonename ]; then + zone=`/usr/bin/zonename` fi fi +output=`"${STCLIENT}" -a -p "${PRODUCT_NAME}" -e "${PRODUCT_VERSION}" -t "${TARGET_URN}" -S "${PRODUCT_SOURCE}" -P "${PARENT_PRODUCT_NAME}" -m "Sun Microsystems, Inc." -A "${uname}" -z "${zone}"` || exit 1 + exit 0 + |