preinstall revision 7c478bd95313f5f23a4c958a745db2134aa03244
ac4e70ff8955669341f435bc0a734a17c01af124Mark Andrews#! /bin/sh
6fe48fb46e53ffc37542853a1edb74cb481b7d94Automatic Updater#
229ea4644b3a7d9c7fdaa43888e7f55ba01e2ee3Automatic Updater# CDDL HEADER START
229ea4644b3a7d9c7fdaa43888e7f55ba01e2ee3Automatic Updater#
1167fc7904c5f0a472f8df207ac46dd52c7f1ec8Automatic Updater# The contents of this file are subject to the terms of the
0c39b3ed9409ecb277d5e32fa763a4e4d6598df8Automatic Updater# Common Development and Distribution License, Version 1.0 only
46da3117812814a29432a8d9a9ccf8acdbfdadceAutomatic Updater# (the "License"). You may not use this file except in compliance
6fe48fb46e53ffc37542853a1edb74cb481b7d94Automatic Updater# with the License.
cd0aa2d941d1438fabb5337f1f38c49478edf71dAutomatic Updater#
79b273c187a4aa1016a62181983dfdd0521681aeMark Andrews# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
90ff38a0d8deaf5f9c2aa5916d99b2e572d28738Automatic Updater# or http://www.opensolaris.org/os/licensing.
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington# See the License for the specific language governing permissions
ac4e70ff8955669341f435bc0a734a17c01af124Mark Andrews# and limitations under the License.
6c6a121295b30772cbf3dd75a51fb9d883051a0eAutomatic Updater#
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington# When distributing Covered Code, include this CDDL HEADER in each
9cd5eb6fe0f26d65724b99216cb31dcdd12e4afdAutomatic Updater# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
e171a4137c6ba348957e61b7c4c3541493c0da02Automatic Updater# If applicable, add the following below this CDDL HEADER, with the
e171a4137c6ba348957e61b7c4c3541493c0da02Automatic Updater# fields enclosed by brackets "[]" replaced with your own identifying
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews# information: Portions Copyright [yyyy] [name of copyright owner]
e130ab53e992670e2a2ecf043976ac09f21358d1Automatic Updater#
3cc98b8ecedcbc8465f1cf2740b966b315662430Automatic Updater# CDDL HEADER END
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews#
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews#
e171a4137c6ba348957e61b7c4c3541493c0da02Automatic Updater# ident "%Z%%M% %I% %E% SMI"
831f79c4310a7d38fc3475ccfff531b2b2535641Automatic Updater#
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews# Copyright (c) 1999 by Sun Microsystems, Inc.
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic Updater# All rights reserved.
efb0e886f18894a1d2489f1ad74ad14b579e11c7Mark Andrews#
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic Updater
91216cff91b34c9ff6e846dc23f248219cafe660Andreas GustafssonPATH="/bin:/usr/bin:/usr/sbin:${PATH}"
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic Updaterexport PATH
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic Updater
91216cff91b34c9ff6e846dc23f248219cafe660Andreas GustafssonTMP=/tmp/$$.pcmemvold
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic Updater
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic Updaterremove_token()
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic Updater{
aa9c561961e9d877946ebaa8795fa2be054ab7bfEvan Hunt
e130ab53e992670e2a2ecf043976ac09f21358d1Automatic Updater cp $1 $TMP
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic Updater
aa9c561961e9d877946ebaa8795fa2be054ab7bfEvan Hunt ( echo "g/$2/s///g"
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic Updater echo 'g/ $/s///g'
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic Updater echo 'w'
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic Updater echo 'q'
aa9c561961e9d877946ebaa8795fa2be054ab7bfEvan Hunt ) | ed -s $TMP >/dev/null
e130ab53e992670e2a2ecf043976ac09f21358d1Automatic Updater
2d2dc37599979c83495510f8af8d1756753aa2c5Automatic Updater cp $TMP $1
aa9c561961e9d877946ebaa8795fa2be054ab7bfEvan Hunt rm -f $TMP
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic Updater}
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic Updater
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic Updater#
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic Updater# vold.conf processing
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic Updater#
cdfc81e048bd34c1d628380247bda6b80a89e20eAutomatic Updater
cdfc81e048bd34c1d628380247bda6b80a89e20eAutomatic UpdaterFILE="$BASEDIR/etc/vold.conf"
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic Updater
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic Updaterif test -f $FILE ; then
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic Updater
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic Updater #
eabc9c3c07cd956d3c436bd7614cb162dabdda76Mark Andrews # clear out any old pcmem lines in vold.conf
eabc9c3c07cd956d3c436bd7614cb162dabdda76Mark Andrews #
eabc9c3c07cd956d3c436bd7614cb162dabdda76Mark Andrews egrep -v 'use pcmem drive' $FILE >$TMP
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington cp $TMP $FILE
9cd5eb6fe0f26d65724b99216cb31dcdd12e4afdAutomatic Updater rm -f $TMP
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews
6fe48fb46e53ffc37542853a1edb74cb481b7d94Automatic Updater #
8e9f3b69914ee02a80b87c97b1f8093edb3e9ae0Automatic Updater # clear out any old pcmem entries in vold.conf
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews #
930f6069e5aa157cf6987cdafd412f5757a5a558Automatic Updater remove_token "$FILE" 'pcmem'
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrewsfi
930f6069e5aa157cf6987cdafd412f5757a5a558Automatic Updater
80faf1588895fd26490f82f95a7a1b771df1c324Automatic Updater#
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews# rmmount.conf processing
6fe48fb46e53ffc37542853a1edb74cb481b7d94Automatic Updater#
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark AndrewsFILE="$BASEDIR/etc/rmmount.conf"
930f6069e5aa157cf6987cdafd412f5757a5a558Automatic Updater
693c4232dfdffaff672197d4b9fea944c64cf80aAutomatic Updaterif test -f $FILE ; then
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic Updater #
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson # clear out any old pcmem entries in rmmount.conf
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic Updater #
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic Updater remove_token "$FILE" 'pcmem'
efb0e886f18894a1d2489f1ad74ad14b579e11c7Mark Andrewsfi
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic Updater
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafssonexit 0
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic Updater
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic Updater