bug 10622: use /root/.ssh/id_rsa.cloud instead of ~/.ssh/id_rsa.cloud

status 10622: resolved fixed
This commit is contained in:
Edison Su 2011-07-13 17:36:58 -07:00
parent 542ea6f0a6
commit a3da10e9b8

View File

@ -23,7 +23,7 @@
# $Id: rundomrpre.sh 10427 2010-07-09 03:30:48Z edison $ $HeadURL: svn://svn.lab.vmops.com/repos/vmdev/java/scripts/vm/hypervisor/kvm/rundomrpre.sh $
set -x
cert="/root/.ssh/id_rsa.cloud"
mntpath() {
local vmname=$1
if [ ! -d /mnt/$vmname ]
@ -87,9 +87,9 @@ patch_all() {
local datadisk=$3
local path=$(mntpath $vmname)
if [ -f ~/.ssh/id_rsa.pub.cloud ]
if [ -f $cert ]
then
cp ~/.ssh/id_rsa.pub.cloud $path/authorized_keys
cp $cert $path/authorized_keys
fi
echo $cmdline > $path/cmdline
sed -i "s/,/\ /g" $path/cmdline