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