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");