preinstall revision c81d47afd05baeb768e2f032636019b717899efd
0N/A#
0N/A# CDDL HEADER START
0N/A#
0N/A# The contents of this file are subject to the terms of the
0N/A# Common Development and Distribution License (the "License").
0N/A# You may not use this file except in compliance with the License.
0N/A#
0N/A# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
0N/A# or http://www.opensolaris.org/os/licensing.
0N/A# See the License for the specific language governing permissions
0N/A# and limitations under the License.
0N/A#
0N/A# When distributing Covered Code, include this CDDL HEADER in each
0N/A# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
0N/A# If applicable, add the following below this CDDL HEADER, with the
0N/A# fields enclosed by brackets "[]" replaced with your own identifying
0N/A# information: Portions Copyright [yyyy] [name of copyright owner]
0N/A#
0N/A# CDDL HEADER END
0N/A#
0N/A#
0N/A# Copyright 2007 Sun Microsystems, Inc. All rights reserved.
0N/A# Use is subject to license terms.
0N/A#
0N/A#ident "%Z%%M% %I% %E% SMI"
0N/A#
0N/A
0N/Aif [ "$UPDATE" = "yes" ]; then
0N/A BASEPREFIX=`echo $BASEDIR | sed "s/\//_/g"`
0N/A
0N/A MANIFESTDIR="$BASEDIR/var/svc/manifest/application/print"
0N/A LPFILENAME=`echo sunwpsr_lpsched"$BASEPREFIX" | cut -c 1-256`
0N/A PPDFILENAME=`echo sunwpsr_ppd_cache_update"$BASEPREFIX" | cut -c 1-256`
0N/A LPTMPFILE=/tmp/$LPFILENAME
0N/A PPDTMPFILE=/tmp/$PPDFILENAME
0N/A
0N/A if [ -f $LPTMPFILE ] ; then
0N/A rm $LPTMPFILE
0N/A fi
0N/A if [ -f $PPDTMPFILE ] ; then
0N/A rm $PPDTMPFILE
0N/A fi
0N/A
0N/A #
0N/A # If we are upgrading a system with smf(5) already installed, then we
0N/A # won't take any action. Otherwise, if there are local print queues,
0N/A # the service was enabled, preserve that.
0N/A #
0N/A if [ ! -f $MANIFESTDIR/server.xml ]; then
0N/A queues=`echo $BASEDIR/etc/lp/printers/*/configuration`
0N/A if [ "$queues" != "$BASEDIR/etc/lp/printers/*/configuration" ];
0N/A then
0N/A touch $LPTMPFILE
0N/A fi
0N/A fi
0N/A
0N/A #
0N/A # If we are upgrading a system with ppd-cache-update service already
0N/A # installed, then don't take any action in postinstall script.
0N/A #
0N/A if [ ! -f $MANIFESTDIR/ppd-cache-update.xml ] ; then
0N/A touch $PPDTMPFILE
0N/A fi
0N/Afi
0N/A