diff --git a/xCAT-server/share/xcat/netboot/rh/genimage b/xCAT-server/share/xcat/netboot/rh/genimage index f9fd5b5c4..f82cda0af 100755 --- a/xCAT-server/share/xcat/netboot/rh/genimage +++ b/xCAT-server/share/xcat/netboot/rh/genimage @@ -1137,22 +1137,6 @@ sub postscripts { # TODO: customized postscripts copy ("$installroot/postscripts/xcatdsklspost", "$rootimg_dir/opt/xcat/"); chmod '0755', "$rootimg_dir/opt/xcat/xcatdsklspost"; } - - if (-d "$installroot/postscripts/hostkeys") { - for my $key (<$installroot/postscripts/hostkeys/*key>) { - copy ($key,"$rootimg_dir/etc/ssh/"); - } - chmod 0600,; - } - if (-d "/$installroot/postscripts/.ssh") { - mkpath("/$rootimg_dir/root/.ssh"); - chmod(0700,"/$rootimg_dir/root/.ssh/"); - for my $file () { - copy ($file,"/$rootimg_dir/root/.ssh/"); - } - chmod(0600,); - } - } sub generic_post { #This function is meant to leave the image in a state approximating a normal install diff --git a/xCAT-server/share/xcat/netboot/sles/genimage b/xCAT-server/share/xcat/netboot/sles/genimage index db9b78886..23f800034 100755 --- a/xCAT-server/share/xcat/netboot/sles/genimage +++ b/xCAT-server/share/xcat/netboot/sles/genimage @@ -1173,21 +1173,6 @@ sub postscripts { # TODO: customized postscripts #system("$XCATROOT/share/xcat/netboot/add-on/statelite/add_passwd $rootimg_dir"); #system("$XCATROOT/share/xcat/netboot/add-on/statelite/add_ssh $rootimg_dir"); } - if (-d "$installroot/postscripts/hostkeys") { - for my $key (<$installroot/postscripts/hostkeys/*key>) { - copy ($key,"$rootimg_dir/etc/ssh/"); - } - chmod 0600,<$rootimg_dir/etc/ssh/*key>; - } - if (-d "/$installroot/postscripts/.ssh") { - mkpath("$rootimg_dir/root/.ssh"); - chmod(0700,"$rootimg_dir/root/.ssh/"); - for my $file () { - copy ($file,"$rootimg_dir/root/.ssh/"); - } - chmod(0600,<$rootimg_dir/root/.ssh/*>); - } - } sub generic_post { #This function is meant to leave the image in a state approximating a normal install