#
# Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
#
#pragma ident	"@(#)142910_SUNWsndmr_preinstall.sh	1.1	10/11/15 SMI"
#

### BEGIN: overlay 142910-17/SUNWsndmr/install/{preinstall|patch_preinstall}
if [ "${PatchID}" = "142910-17" \
	-a `/usr/bin/basename $0` = "preinstall" \
	-a "${PKG}" = "SUNWsndmr" ] ; then
# Preserve the value of config/local_only property for smtp-sendmail
# service
preinstall_merge() {

#!/bin/sh
#
#ident	"@(#)142910_SUNWsndmr_preinstall.sh	1.1	10/11/15 SMI"
#
# Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
#
#
[ -s "$PKG_INSTALL_ROOT/etc/svc/repository.db" ] && \
    SVCCFG_REPOSITORY="$PKG_INSTALL_ROOT/etc/svc/repository.db" \
    /usr/sbin/svccfg -s svc:/network/smtp:sendmail listprop config/local_only \
        2> /dev/null | (
        read x x prop_value x
        [ -n "$prop_value" ] && \
            echo "/usr/sbin/svccfg -s svc:/network/smtp:sendmail setprop \
config/local_only=$prop_value" >> "$BASEDIR/var/svc/profile/upgrade" )

return 0

}

patch_preinstall() {
    preinstall_merge
}

fi
### END: overlay 142910-17/SUNWsndmr/install/{preinstall|patch_preinstall}
