add support for skiptables
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@9698 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
parent
46eb5f5c12
commit
90ba48cdb8
@ -42,6 +42,13 @@ if ($? != 0)
|
||||
xCAT::MsgUtils->message("E", $msg);
|
||||
exit 1;
|
||||
}
|
||||
# read tables to skip during restore from site.skiptables attribute
|
||||
my @output2=xCAT::Utils->get_site_attribute('skiptables');
|
||||
my @skiptbls;
|
||||
if (@output2) {
|
||||
@skiptbls = split (/\,/,$output2[0]);
|
||||
}
|
||||
|
||||
my @files = readdir(DIRPATH);
|
||||
foreach my $table (@files)
|
||||
{
|
||||
@ -64,6 +71,17 @@ foreach my $table (@files)
|
||||
}
|
||||
next;
|
||||
}
|
||||
# skip and table in the site.skiptables attribute
|
||||
if (@skiptbls) {
|
||||
my ($tmptable,$suffix) = split(/\./,$table);
|
||||
chomp $tmptable;
|
||||
if (grep(/^$tmptable$/, @skiptbls)) {
|
||||
if ($::VERBOSEREST) {
|
||||
xCAT::MsgUtils->message("I", "Skipping $tmptable\n");
|
||||
}
|
||||
next;
|
||||
}
|
||||
}
|
||||
|
||||
my $cmd = "tabrestore $tablename";
|
||||
my @errout = xCAT::Utils->runcmd($cmd, 0);
|
||||
|
Loading…
Reference in New Issue
Block a user