#!/bin/sh
#
# $Header: provisionCopyOldKeys.sh 07-feb-2006.23:28:40 adeb Exp $
#
# provisionCopyOldKeys.sh
#
# Copyright (c) 2006, Oracle. All rights reserved.  
#
#    NAME
#      provisionCopyOldKeys.sh - <one-line expansion of the name>
#
#    DESCRIPTION
#     copy the SSH keys associated with all hosts in the old CRS cluster to the new host 
#
#    NOTES
#      <other useful comments, qualifications, etc.>
#
#    MODIFIED   (MM/DD/YY)
#    adeb        01/29/06 - Creation
#
usernm=$2
userhome=`awk -v usr="$usernm" -F: '$1 ==usr  {print $6}'  /etc/passwd`;
cat $1/userkeys.old >> $userhome/.ssh/authorized_keys;
cat $1/hostkeys.old  >> $userhome/.ssh/known_hosts;

