xref: /titanic_51/usr/src/cmd/svr4pkg/pkgscripts/i.preserve.sh (revision 53520bfd0d8e6401efee237b91e682ab66f77eef)
1*53520bfdSMoriah Waterland#!/bin/sh
2*53520bfdSMoriah Waterland#
3*53520bfdSMoriah Waterland# CDDL HEADER START
4*53520bfdSMoriah Waterland#
5*53520bfdSMoriah Waterland# The contents of this file are subject to the terms of the
6*53520bfdSMoriah Waterland# Common Development and Distribution License (the "License").
7*53520bfdSMoriah Waterland# You may not use this file except in compliance with the License.
8*53520bfdSMoriah Waterland#
9*53520bfdSMoriah Waterland# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10*53520bfdSMoriah Waterland# or http://www.opensolaris.org/os/licensing.
11*53520bfdSMoriah Waterland# See the License for the specific language governing permissions
12*53520bfdSMoriah Waterland# and limitations under the License.
13*53520bfdSMoriah Waterland#
14*53520bfdSMoriah Waterland# When distributing Covered Code, include this CDDL HEADER in each
15*53520bfdSMoriah Waterland# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16*53520bfdSMoriah Waterland# If applicable, add the following below this CDDL HEADER, with the
17*53520bfdSMoriah Waterland# fields enclosed by brackets "[]" replaced with your own identifying
18*53520bfdSMoriah Waterland# information: Portions Copyright [yyyy] [name of copyright owner]
19*53520bfdSMoriah Waterland#
20*53520bfdSMoriah Waterland# CDDL HEADER END
21*53520bfdSMoriah Waterland#
22*53520bfdSMoriah Waterland
23*53520bfdSMoriah Waterland#
24*53520bfdSMoriah Waterland# Copyright 1998 Sun Microsystems, Inc.  All rights reserved.
25*53520bfdSMoriah Waterland# Use is subject to license terms.
26*53520bfdSMoriah Waterland#
27*53520bfdSMoriah Waterland
28*53520bfdSMoriah Waterland
29*53520bfdSMoriah Waterlanderror=no
30*53520bfdSMoriah Waterlandecho "## checking common configuration files"
31*53520bfdSMoriah Waterlandwhile read src dest
32*53520bfdSMoriah Waterlanddo
33*53520bfdSMoriah Waterland      [ "$src" = /dev/null ] && continue
34*53520bfdSMoriah Waterland
35*53520bfdSMoriah Waterland      if [ -f "$dest" ]
36*53520bfdSMoriah Waterland      then
37*53520bfdSMoriah Waterland              echo $dest preserved
38*53520bfdSMoriah Waterland      else
39*53520bfdSMoriah Waterland              echo $dest
40*53520bfdSMoriah Waterland              cp $src $dest || error=yes
41*53520bfdSMoriah Waterland      fi
42*53520bfdSMoriah Waterland
43*53520bfdSMoriah Waterlanddone
44*53520bfdSMoriah Waterland[ "$error" = yes ] &&
45*53520bfdSMoriah Waterland        exit 2
46*53520bfdSMoriah Waterlandexit 0
47