postinstall revision aecfc01d1bad84e66649703f7fc2926ef70b34ba
b1ae8b1c40ec6bb82e7984b72712df5661332e2cvboxsync# CDDL HEADER START
b1ae8b1c40ec6bb82e7984b72712df5661332e2cvboxsync# The contents of this file are subject to the terms of the
b1ae8b1c40ec6bb82e7984b72712df5661332e2cvboxsync# Common Development and Distribution License (the "License").
b1ae8b1c40ec6bb82e7984b72712df5661332e2cvboxsync# You may not use this file except in compliance with the License.
b1ae8b1c40ec6bb82e7984b72712df5661332e2cvboxsync# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
b1ae8b1c40ec6bb82e7984b72712df5661332e2cvboxsync# See the License for the specific language governing permissions
b1ae8b1c40ec6bb82e7984b72712df5661332e2cvboxsync# and limitations under the License.
b1ae8b1c40ec6bb82e7984b72712df5661332e2cvboxsync# When distributing Covered Code, include this CDDL HEADER in each
b1ae8b1c40ec6bb82e7984b72712df5661332e2cvboxsync# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
b1ae8b1c40ec6bb82e7984b72712df5661332e2cvboxsync# If applicable, add the following below this CDDL HEADER, with the
b1ae8b1c40ec6bb82e7984b72712df5661332e2cvboxsync# fields enclosed by brackets "[]" replaced with your own identifying
b1ae8b1c40ec6bb82e7984b72712df5661332e2cvboxsync# information: Portions Copyright [yyyy] [name of copyright owner]
b1ae8b1c40ec6bb82e7984b72712df5661332e2cvboxsync# CDDL HEADER END
7b1a1a5dea048e6a23a740ed5b5ef456f3958a0avboxsync# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
7b1a1a5dea048e6a23a740ed5b5ef456f3958a0avboxsync# Use is subject to license terms.
d35bc16bb4e4d1795110172a6f4afb9a29d0d0cdvboxsyncBASEPREFIX=`echo $BASEDIR | sed "s/\//_/g"`
d35bc16bb4e4d1795110172a6f4afb9a29d0d0cdvboxsync# Clear sysidtool which may have gone into maintenance due to a dependency
d35bc16bb4e4d1795110172a6f4afb9a29d0d0cdvboxsync# cycle with milestone/single-user, when upgrading to a system that
7b1a1a5dea048e6a23a740ed5b5ef456f3958a0avboxsynccat >> $BASEDIR/var/svc/profile/upgrade <<\_CLRSYSID
b1ae8b1c40ec6bb82e7984b72712df5661332e2cvboxsync /usr/sbin/svcadm clear svc:/system/sysidtool:system
80096fb54d147045204dcc7e3ff273158de03f81vboxsyncif [ -f $BASEDIR/etc/inet/ipnodes.hostsmerge ]; then
b1ae8b1c40ec6bb82e7984b72712df5661332e2cvboxsync if [ $? = 0 ] ; then
b1ae8b1c40ec6bb82e7984b72712df5661332e2cvboxsync if [ $? = 0 ] ; then
80096fb54d147045204dcc7e3ff273158de03f81vboxsync if [ $? = 0 ] ; then
7b1a1a5dea048e6a23a740ed5b5ef456f3958a0avboxsyncif [ -f $PMTAB ] ; then
80096fb54d147045204dcc7e3ff273158de03f81vboxsync sed -e 's/\\x00020ACE......../\\x00020ACE00000000/' \
AUTH_ATTR=$BASEDIR/etc/security/auth_attr
EXEC_ATTR=$BASEDIR/etc/security/exec_attr
INITTAB=$BASEDIR/etc/inittab
VFSTAB=$BASEDIR/etc/vfstab
cat >> $BASEDIR/var/svc/profile/upgrade <<\_DEL_BIND8
obs_se=/usr/sbin/in.named
svcadm disable -s svc:/network/dns/server:default
svccfg delete svc:/network/dns/server:default
svccfg delete svc:/network/dns/server
cat >> $BASEDIR/var/svc/profile/upgrade <<\_DEL_TNAME
svccfg delete -f svc:/network/tname
SVCCFG_REPOSITORY=$PKG_INSTALL_ROOT/etc/svc/repository.db
if [ -r $PKG_INSTALL_ROOT/etc/svc/volatile/repository_door ]; then
IKEMANIFEST=`echo ike.xml"$BASEPREFIX" | cut -c 1-256`
cat >> ${PKG_INSTALL_ROOT}/var/svc/profile/upgrade <<\_IPSECUPGRD
if [ -f /etc/inet/ike/config ]; then
MANKEYMANIFEST=`echo manual-key.xml"$BASEPREFIX" | cut -c 1-256`
cat >> ${PKG_INSTALL_ROOT}/var/svc/profile/upgrade <<\_IPSECUPGRD
if [ -f /etc/inet/secret/ipseckeys ]; then
# /var/svc/profile/upgrade as it runs before manifest-import.
if [ -r $PKG_INSTALL_ROOT/etc/svc/volatile/repository_door ]; then
svcadm disable -s svc:/platform/i86pc/eeprom:default \
>/dev/null 2>&1
# svc:/network/rpc/keyserv is expected to be off on systems that don't
cat >> $BASEDIR/var/svc/profile/upgrade <<\_CSVC_UPGRADE_2
if [ ! -f /etc/defaultdomain ]; then
svcadm disable network/rpc/keyserv
# On initial install, default to ns_files.xml. The installer will
elif [ ! -r $BASEDIR/var/svc/profile/name_service.xml ] || \
[ ! -L $BASEDIR/var/svc/profile/name_service.xml ]; then
ns_profile=ns_ldap.xml
ns_profile=ns_nisplus.xml
ns_profile=ns_nis.xml
ns_profile=ns_files.xml
# Remove stale copy of name_service.xml, if it is not a symlink.
if [ ! -L $BASEDIR/var/svc/profile/name_service.xml ]; then
ln -s $ns_profile $BASEDIR/var/svc/profile/name_service.xml
# /etc/svc/repository.db was previously packaged but it is now generated
PROFILEDIR=$BASEDIR/var/svc/profile
GENERICXML=${PROFILEDIR}/generic.xml
if [ -f $BASEDIR/var/SUNWcsr-apply-limited-net ]; then
ln -sf ./generic_limited_net.xml ${GENERICXML}
/usr/sbin/netservices limited
# If we have a previous version of generic.xml, keep that.
ln -s ./generic_open.xml $GENERICXML
removef -f $PKGINST >/dev/null 2>&1
# Solaris audit's internal "enable/disable" state is maintained by
cat >> $BASEDIR/var/svc/profile/upgrade <<\_ENABLE_AUDIT
if [ `/sbin/zonename` = global ]; then
# if platform/sun4u/mpxio-upgrade service exists, then
cat >> $BASEDIR/var/svc/profile/upgrade <<\_MPXIOUPGRD
cat >> $BASEDIR/var/svc/profile/upgrade <<\_NWAM_SYSID
/usr/sbin/sysidconfig -b "${PKG_INSTALL_ROOT}" -l |\
/usr/sbin/sysidconfig -b "${PKG_INSTALL_ROOT}" \
# Migrate /etc/acctadm.conf settings to smf(5) repository. Enable the instance
cat >> $BASEDIR/var/svc/profile/upgrade <<\_ACCTADM
if [ -f /etc/acctadm.conf ]; then
fmri="svc:/system/extended-accounting:flow"
svccfg -s $fmri setprop config/file = \
svccfg -s $fmri setprop config/tracked = \
svccfg -s $fmri setprop config/untracked = \
svccfg -s $fmri setprop config/enabled = "true"
svccfg -s $fmri setprop config/enabled = "false"
fmri="svc:/system/extended-accounting:process"
svccfg -s $fmri setprop config/file = \
svccfg -s $fmri setprop config/tracked = \
svccfg -s $fmri setprop config/untracked = \
svccfg -s $fmri setprop config/enabled = "true"
svccfg -s $fmri setprop config/enabled = "false"
fmri="svc:/system/extended-accounting:task"
svccfg -s $fmri setprop config/file = \
svccfg -s $fmri setprop config/tracked = \
svccfg -s $fmri setprop config/untracked = \
svccfg -s $fmri setprop config/enabled = "true"
svccfg -s $fmri setprop config/enabled = "false"
if [ -f $PKG_INSTALL_ROOT/var/tmp/vtdaemon_installed.tmp ]; then
cat >> ${PKG_INSTALL_ROOT}/var/svc/profile/upgrade <<-EOF