defect 2843392: if there is non-existed synclist file, output an error message
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@4031 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
parent
2428c5a819
commit
22d82e9a5d
@ -249,11 +249,7 @@ sub getsynclistfile()
|
||||
}
|
||||
foreach my $osimage (@profiles) {
|
||||
my $synclist = $osimage_t->getAttribs({imagename=>"$osimage"}, 'synclists');
|
||||
if (-r $synclist->{'synclists'}) {
|
||||
$osimage_syncfile{$osimage} = $synclist->{'synclists'};
|
||||
} else {
|
||||
$osimage_syncfile{$osimage} = undef;
|
||||
}
|
||||
$osimage_syncfile{$osimage} = $synclist->{'synclists'};
|
||||
}
|
||||
|
||||
# set the syncfiles to the nodes
|
||||
|
@ -306,6 +306,16 @@ sub updatenode {
|
||||
}
|
||||
}
|
||||
|
||||
# Check the existence of the synclist file
|
||||
foreach my $synclist (keys %syncfile_node) {
|
||||
if (! (-r $synclist)) {
|
||||
my $rsp={};
|
||||
$rsp->{data}->[0]= "The Synclist file $synclist which specified for certain node does NOT existed.";
|
||||
xCAT::MsgUtils->message("E", $rsp, $callback);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
# Sync files to the target nodes
|
||||
foreach my $synclist (keys %syncfile_node) {
|
||||
my $args = ["-F", "$synclist"];
|
||||
|
Loading…
x
Reference in New Issue
Block a user