preinstall revision 18c2aff776a775d34a4c9893a4c72e0434d68e36
98N/A#! /bin/sh
98N/A#
606N/A# CDDL HEADER START
98N/A#
98N/A# The contents of this file are subject to the terms of the
98N/A# Common Development and Distribution License, Version 1.0 only
98N/A# (the "License"). You may not use this file except in compliance
98N/A# with the License.
98N/A#
98N/A# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
98N/A# or http://www.opensolaris.org/os/licensing.
98N/A# See the License for the specific language governing permissions
98N/A# and limitations under the License.
98N/A#
98N/A# When distributing Covered Code, include this CDDL HEADER in each
98N/A# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
98N/A# If applicable, add the following below this CDDL HEADER, with the
98N/A# fields enclosed by brackets "[]" replaced with your own identifying
98N/A# information: Portions Copyright [yyyy] [name of copyright owner]
98N/A#
98N/A# CDDL HEADER END
98N/A#
98N/A#
98N/A# ident "%Z%%M% %I% %E% SMI"
98N/A#
98N/A# Copyright (c) 1999 by Sun Microsystems, Inc.
98N/A# All rights reserved.
98N/A#
98N/A
98N/APATH="/bin:/usr/bin:/usr/sbin:${PATH}"
606N/Aexport PATH
98N/A
98N/ATMP=/tmp/$$.pcmemvold
98N/A
354N/Aremove_token()
354N/A{
354N/A
354N/A cp $1 $TMP
354N/A
354N/A ( echo "g/$2/s///g"
354N/A echo 'g/ $/s///g'
354N/A echo 'w'
606N/A echo 'q'
354N/A ) | ed -s $TMP >/dev/null
354N/A
606N/A cp $TMP $1
606N/A rm -f $TMP
354N/A}
98N/A
98N/A#
98N/A# vold.conf processing
571N/A#
98N/A
98N/AFILE="$BASEDIR/etc/vold.conf"
98N/A
341N/Aif test -f $FILE ; then
366N/A
354N/A #
425N/A # clear out any old pcmem lines in vold.conf
325N/A #
456N/A egrep -v 'use pcmem drive' $FILE >$TMP
577N/A cp $TMP $FILE
325N/A rm -f $TMP
354N/A
278N/A #
98N/A # clear out any old pcmem entries in vold.conf
543N/A #
98N/A remove_token "$FILE" 'pcmem'
98N/Afi
151N/A
137N/A#
153N/A# rmmount.conf processing
210N/A#
366N/AFILE="$BASEDIR/etc/rmmount.conf"
98N/A
179N/Aif test -f $FILE ; then
269N/A
126N/A #
98N/A # clear out any old pcmem entries in rmmount.conf
98N/A #
543N/A remove_token "$FILE" 'pcmem'
543N/Afi
98N/A
287N/Aexit 0
366N/A
499N/A