# Copyright 09 May 1995 Sun Microsystems, Inc. All Rights Reserved. 
#
#pragma ident  "@(#)postinstall	1.10 95/05/09 Sun Microsystems"
#
# postinstall script for Network Manager CMIP MPA package
#
# Exit codes for installation scripts

export   BASEDIR

e_ok=0
e_fatal=1      # stop installation on this exit
e_warning=2    # Installation will go on.
e_int=3        # Interrupted. Stop installation
e_reboot=10    # User must reboot after installation of all selected packages
e_rebootnow=20 # User must reboot right after installation of current package
               # To be added to one of the single-digit exit codes above

#
# Trap interrupt
#
trap `exit $e_int` 15


#
# main ()
#

#
# set MISNAME and MISPORT

file=/etc/rc2.d/S98cmipmpa

/usr/sbin/installf $PKGINST $file f 0755 root sys
ex -  $file <<MISHOSTEDIT >/dev/null
1,\$s!localhost!$MISNAME!g
1,\$s!5557!$MPAPORT!g
1,\$s!/opt/SUNWconn!$BASEDIR/SUNWconn!g
w
q
MISHOSTEDIT

/usr/sbin/installf -f $PKGINST 
 

#
# start up the cmip mpa

$file start

#
# Export Parameters
#
exit $e_ok
