postinstall revision 7c478bd95313f5f23a4c958a745db2134aa03244
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke Smith# CDDL HEADER START
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke Smith# The contents of this file are subject to the terms of the
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke Smith# Common Development and Distribution License, Version 1.0 only
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke Smith# (the "License"). You may not use this file except in compliance
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke Smith# with the License.
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke Smith# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke Smith# See the License for the specific language governing permissions
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke Smith# and limitations under the License.
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke Smith# When distributing Covered Code, include this CDDL HEADER in each
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke Smith# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke Smith# If applicable, add the following below this CDDL HEADER, with the
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke Smith# fields enclosed by brackets "[]" replaced with your own identifying
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke Smith# information: Portions Copyright [yyyy] [name of copyright owner]
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke Smith# CDDL HEADER END
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke Smith# Copyright 2004 Sun Microsystems, Inc. All rights reserved.
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke Smith# Use is subject to license terms.
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke Smith#ident "%Z%%M% %I% %E% SMI"
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke Smith# Create default /dev/pps1 link (/dev/cua/a exists on all architectures
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke Smith# where the machine has a serial port)
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke Smith# Perform work inside $BASEDIR/dev so symlinks are made relative.
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke Smith if [ -c cua/a ] ; then
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke Smith if [ -h pps1 ] ; then
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke Smith ln -s cua/a pps1
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke Smith# if SUNWxntp is installed, copy ntp.conf to the location SUNWntpr
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke Smith# expects it to be.
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke Smithif [ -r $BASEDIR/etc/opt/SUNWxntp/ntp.conf ] ; then
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke Smith cp $BASEDIR/etc/opt/SUNWxntp/ntp.conf $BASEDIR/etc/inet/ntp.conf
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke Smith removef $PKGINST $BASEDIR/etc/opt/SUNWxntp/ntp.conf >/dev/null 2>&1
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke Smith removef -f $PKGINST || exit 2
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke Smith# If appropriate, enable this service.
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke SmithBASEPREFIX=`echo $BASEDIR | sed "s/\//_/g"`
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke SmithFILENAME=`echo sunwntpr_ntp"$BASEPREFIX" | cut -c 1-256`
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke SmithTMPFILE=/tmp/$FILENAME
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke Smithif [ -f $TMPFILE ]; then