From e74a7bcedba89f8914139522fd272af4942fb0db Mon Sep 17 00:00:00 2001 From: jbjohnso Date: Tue, 6 Nov 2007 22:10:23 +0000 Subject: [PATCH] Fix CentOS netboot image build to have correct paths git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@39 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server-2.0/usr/lib/xcat/plugins/centos.pm | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/xCAT-server-2.0/usr/lib/xcat/plugins/centos.pm b/xCAT-server-2.0/usr/lib/xcat/plugins/centos.pm index 6f9a002bc..32041ed29 100644 --- a/xCAT-server-2.0/usr/lib/xcat/plugins/centos.pm +++ b/xCAT-server-2.0/usr/lib/xcat/plugins/centos.pm @@ -106,8 +106,8 @@ sub mknetboot { } } $restab->setNodeAttribs($node,{ - kernel=>"xcat/netboot/$osver/$arch/kernel", - initrd=>"xcat/netboot/$osver/$arch/rootimg.gz", + kernel=>"xcat/netboot/$osver/$arch/$profile/kernel", + initrd=>"xcat/netboot/$osver/$arch/$profile/rootimg.gz", kcmdline=>$kcmdline }); } @@ -154,14 +154,15 @@ sub makenetboot { for my $key (<$installroot/postscripts/hostkeys/*key>) { copy ($key,"$installroot/netboot/$osver/$arch/$profile/rootimg/etc/ssh/"); } + chmod 0600,; } if (-d "/$installroot/postscripts/.ssh") { - mkdir("/$installroot/root/.ssh"); - chmod(0700,"/$installroot/root/.ssh"); + mkpath("/$installroot/netboot/$osver/$arch/$profile/rootimg/root/.ssh"); + chmod(0700,"/$installroot/netboot/$osver/$arch/$profile/rootimg/root/.ssh/"); for my $file () { - copy ($key,"/$installroot/root/.ssh/"); + copy ($file,"/$installroot/netboot/$osver/$arch/$profile/rootimg/root/.ssh/"); } - chmod(0600,); + chmod(0600,); } my $oldpath=cwd; chdir("$installroot/netboot/$osver/$arch/$profile/rootimg");