i.etcprofile revision 7c478bd95313f5f23a4c958a745db2134aa03244
d6fa26d0adaec6c910115be34fe7a5a5f402c14fMark Andrews#!/bin/sh
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews#
71cef386fae61275b03e203825680b39fedaa8c6Tinderbox User# CDDL HEADER START
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews#
5347c0fcb04eaea19d9f39795646239f487c6207Tinderbox User# The contents of this file are subject to the terms of the
5347c0fcb04eaea19d9f39795646239f487c6207Tinderbox User# Common Development and Distribution License, Version 1.0 only
5347c0fcb04eaea19d9f39795646239f487c6207Tinderbox User# (the "License"). You may not use this file except in compliance
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# with the License.
d6fa26d0adaec6c910115be34fe7a5a5f402c14fMark Andrews#
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# or http://www.opensolaris.org/os/licensing.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# See the License for the specific language governing permissions
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User# and limitations under the License.
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt#
cd32f419a8a5432fbb139f56ee73cbf68b9350ccTinderbox User# When distributing Covered Code, include this CDDL HEADER in each
0c6ada0a814f3c5417daa1654129bc2af56ed504Automatic Updater# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# If applicable, add the following below this CDDL HEADER, with the
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# fields enclosed by brackets "[]" replaced with your own identifying
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# information: Portions Copyright [yyyy] [name of copyright owner]
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews#
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# CDDL HEADER END
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews#
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews#
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews#pragma ident "%Z%%M% %I% %E% SMI"
0c6ada0a814f3c5417daa1654129bc2af56ed504Automatic Updater#
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# Copyright (c) 1999,2001 by Sun Microsystems, Inc.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# All rights reserved.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews#
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsPATH="/usr/bin:/usr/sbin:${PATH}" export PATH
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewswhile read src dest
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox Userdo
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews if [ ! -f $dest ] ; then
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User cp $src $dest
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User else
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User (
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User # Get the SCCS ID from the source.
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User grep '^#.*ident.*@(#)profile' $src
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews # Remove the SCCS ID from the destination.
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User # Solaris/Intel console type now "sun-color".
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User # Add -bash to shell case
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User SHELLS='-sh | -ksh | -jsh'
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User sed -e '/^#.*ident.*@(#)profile/d' \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews -e "s/^${SHELLS})$/${SHELLS} | -bash)/" \
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User -e 's/TERM=AT386/TERM=sun-color/' \
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User $dest
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User ) > /tmp/prof.$$
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User cp /tmp/prof.$$ $dest
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews rm -f /tmp/prof.$$
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User fi
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox Userdone
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox Userexit 0
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User