fix feature request 189, support not contain existing postscript in kit
This commit is contained in:
parent
793a6c1709
commit
c51cfca5e1
@ -1346,16 +1346,16 @@ sub addkit
|
||||
} else {
|
||||
$rc = system("cp -rf $kitdir/other_files/$_ $installdir/postscripts/");
|
||||
}
|
||||
if($rc && !-e "$installdir/postscripts/$_"){
|
||||
my %rsp;
|
||||
push@{ $rsp{data} }, "Failed to copy scripts from $kitdir/scripts/ to $installdir/postscripts";
|
||||
xCAT::MsgUtils->message( "E", \%rsp, $callback );
|
||||
return 1;
|
||||
}
|
||||
$rc = 0;
|
||||
chmod(0755,"$installdir/postscripts/$_");
|
||||
}
|
||||
|
||||
if($rc){
|
||||
my %rsp;
|
||||
push@{ $rsp{data} }, "Failed to copy scripts from $kitdir/scripts/ to $installdir/postscripts";
|
||||
xCAT::MsgUtils->message( "E", \%rsp, $callback );
|
||||
return 1;
|
||||
}
|
||||
|
||||
# Copying plugins to /opt/xcat/lib/perl/xCAT_plugin/
|
||||
if ( -d "$kitdir/plugins/" ) {
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user