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 # Copyright 2008 Sun Microsystems, Inc. All rights reserved. 24 # Use is subject to license terms. 25 # 26 # ident "%Z%%M% %I% %E% SMI" 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 # Add the entry for nispasswd used by rpc.nispasswdd. 38 # We do not get fancy and try to add it at the "right" 39 # location. Putting it on the end works just fine. 40 41 grep 'nispasswd' $dest > /dev/null 2>&1 42 if [ $? -ne 0 ] ; then 43 echo 'nispasswd 100303 rpc.nispasswdd' >> $dest 44 fi 45 46 # Add solstice admind entry 47 grep '100087' $dest > /dev/null 2>&1 48 if [ $? -eq 0 ] ; then 49 50 sed 's/.*100087.*/sadmind 100232/' $dest > /tmp/r.$$ 51 cp /tmp/r.$$ $dest 52 rm -f /tmp/r.$$ 53 fi 54 55 # Add nfs_acl entry 56 grep 'nfs_acl' $dest > /dev/null 2>&1 57 if [ $? -ne 0 ] ; then 58 echo 'nfs_acl 100227' >> $dest 59 fi 60 61 # Delete beta ufsd entry 62 grep 'ufsd[ ]*100999[ ]*ufsd' $dest >/dev/null 2>&1 63 if [ $? -eq 0 ] ; then 64 grep -v 'ufsd[ ]*100999[ ]*ufsd' $dest \ 65 >/tmp/etcrpc.$$ 2>/dev/null 66 cp /tmp/etcrpc.$$ $dest 67 rm -f /tmp/etcrpc.$$ 68 fi 69 70 # Add ufsd entry 71 grep 'ufsd' $dest > /dev/null 2>&1 72 if [ $? -ne 0 ] ; then 73 echo 'ufsd 100233 ufsd' >> $dest 74 fi 75 76 # Delete amiserv entry 77 grep 'amiserv[ ]*100146' $dest >/dev/null 2>&1 78 if [ $? -eq 0 ] ; then 79 grep -v 'amiserv[ ]*100146' $dest \ 80 >/tmp/etcrpc.$$ 2>/dev/null 81 cp /tmp/etcrpc.$$ $dest 82 rm -f /tmp/etcrpc.$$ 83 fi 84 85 # Delete amiaux entry 86 grep 'amiaux[ ]*100147' $dest >/dev/null 2>&1 87 if [ $? -eq 0 ] ; then 88 grep -v 'amiaux[ ]*100147' $dest \ 89 >/tmp/etcrpc.$$ 2>/dev/null 90 cp /tmp/etcrpc.$$ $dest 91 rm -f /tmp/etcrpc.$$ 92 fi 93 94 # Add ocfserv entry 95 grep 'ocfserv' $dest > /dev/null 2>&1 96 if [ $? -ne 0 ] ; then 97 echo 'ocfserv 100150' >> $dest 98 fi 99 100 # Add metad entry 101 grep 'metad' $dest > /dev/null 2>&1 102 if [ $? -ne 0 ] ; then 103 echo 'metad 100229 metad' >> $dest 104 fi 105 106 # Add metamhd entry 107 grep 'metamhd' $dest > /dev/null 2>&1 108 if [ $? -ne 0 ] ; then 109 echo 'metamhd 100230 metamhd' >> $dest 110 fi 111 112 # Add metamedd entry 113 grep 'metamedd' $dest > /dev/null 2>&1 114 if [ $? -ne 0 ] ; then 115 echo 'metamedd 100242 metamedd' >> $dest 116 fi 117 118 # Add smserverd entry 119 grep 'smserverd' $dest > /dev/null 2>&1 120 if [ $? -ne 0 ] ; then 121 echo 'smserverd 100155 smserverd' >> $dest 122 fi 123 124 # Add gssd entry 125 grep 'gssd' $dest > /dev/null 2>&1 126 if [ $? -ne 0 ] ; then 127 echo 'gssd 100234' >> $dest 128 fi 129 130 # Add ktkt_warnd entry 131 grep 'ktkt_warnd' $dest > /dev/null 2>&1 132 if [ $? -ne 0 ] ; then 133 echo 'ktkt_warnd 100134' >> $dest 134 fi 135 136 fi 137 done 138 139 exit 0 140