1 #!/bin/sh 2 # 3 # CDDL HEADER START 4 # 5 # The contents of this file are subject to the terms of the 6 # Common Development and Distribution License (the "License"). 7 # You may not use this file except in compliance with the License. 8 # 9 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 10 # or http://www.opensolaris.org/os/licensing. 11 # See the License for the specific language governing permissions 12 # and limitations under the License. 13 # 14 # When distributing Covered Code, include this CDDL HEADER in each 15 # file and include the License file at usr/src/OPENSOLARIS.LICENSE. 16 # If applicable, add the following below this CDDL HEADER, with the 17 # fields enclosed by brackets "[]" replaced with your own identifying 18 # information: Portions Copyright [yyyy] [name of copyright owner] 19 # 20 # CDDL HEADER END 21 # 22 # 23 #ident "%Z%%M% %I% %E% SMI" 24 # 25 # Copyright 2008 Sun Microsystems, Inc. All rights reserved. 26 # Use is subject to license terms. 27 # 28 29 PATH="/usr/bin:/usr/sbin:${PATH}" 30 export PATH 31 32 while read src dest 33 do 34 if [ ! -f $dest ] ; then 35 cp $src $dest 36 else 37 newline=`grep '^# Copyright.*Sun Microsystems, Inc.$' $src \ 38 2>/dev/null` 39 if [ $? != 0 ]; then 40 echo $0: missing copyright in $src 41 exit 1 42 fi 43 sed "s|^# Copyright.*Sun Microsystems, Inc.$|$newline|" \ 44 $dest > /tmp/work.$$ 45 cp /tmp/work.$$ $dest 46 47 # In 2.3, we stopped logging auth.notice messages 48 # into /var/adm/messages 49 50 newline=`grep '.*;daemon.notice;.*/var/adm/messages$' $src \ 51 2>/dev/null` 52 if [ $? != 0 ]; then 53 echo $0: missing entry in $src for /var/adm/messages 54 exit 1 55 fi 56 sed "s|.*;daemon,auth.notice;.*/var/adm/messages$|$newline|" \ 57 $dest > /tmp/work.$$ 58 cp /tmp/work.$$ $dest 59 60 # 61 # in 2.4, we don't put kern.debug messages on the console. 62 # 63 sed '\:/dev/console: s/kern\.debug/kern.notice/' \ 64 $dest > /tmp/work.$$ 65 cp /tmp/work.$$ $dest 66 67 # 68 # in 2.8, we don't put messages on the console, 69 # but to sysmsg instead. 70 # 71 sed '\:/dev/console: s,/dev/console,/dev/sysmsg,' \ 72 $dest > /tmp/work.$$ 73 cp /tmp/work.$$ $dest 74 fi 75 done 76 rm -f /tmp/work.$$ 77 78 exit 0 79