From 5642f352f2efae870f1b125528dddfdf5b68647f Mon Sep 17 00:00:00 2001 From: jbjohnso Date: Mon, 10 Oct 2011 20:33:07 +0000 Subject: [PATCH] Carry over ssh authorized keys from install image to installed esxi system git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@10735 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/share/xcat/install/esxi/hypervisor.tmpl | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/xCAT-server/share/xcat/install/esxi/hypervisor.tmpl b/xCAT-server/share/xcat/install/esxi/hypervisor.tmpl index cd1aeb6c1..0f3d2a6b2 100644 --- a/xCAT-server/share/xcat/install/esxi/hypervisor.tmpl +++ b/xCAT-server/share/xcat/install/esxi/hypervisor.tmpl @@ -25,6 +25,14 @@ cp /etc/resolv.conf /etc/resolv.conf.xcat %post --interpreter=busybox --ignorefailure=true +for dir in /vmfs/volumes/*; do + if [ -e $dir/boot.cfg -a $dir/s.v00 ]; then + cd / + tar zcvf $dir/xcatmod.tgz etc/ssh/keys-root/authorized_keys + sed -i 's/onetime.tgz/xcatmod.tgz --- onetime.tgz/' $dir/boot.cfg + fi +done + # tell xCAT management server we are done installing # have to put in the IP address instead of the hostname because VMware # ESXi 4.1 can not resolve IP addresses...