move updateschema from Table->new to xcatd

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@7336 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
lissav 2010-09-01 14:10:18 +00:00
parent d3295bc15e
commit b5b4c667cd

View File

@ -149,14 +149,24 @@ $SIG{PIPE} = sub {
};
$progname = \$0;
#create and update any xCAt tables
#create the user defined external database tables if they do not exist.
#update the tables if there are schema changes.
# runsqlcmd runs sql scripts provided by the user in
# /opt/xcat/lib/perl/xCAT_schema
if (xCAT::Utils->isMN()) {
# update schema for xCAT tables
my %int_tabspec;
%int_tabspec = xCAT::Table->getTableList;
foreach my $tablename (keys %int_tabspec) {
my $tablelisttab=xCAT::Table->new($tablename,-create=>1);
my $rc= $tablelisttab->updateschema();
$tablelisttab->close;
}
# update schema for user tables
xCAT::ExtTab->updateTables();
# run any sql commands
`$::XCATROOT/sbin/runsqlcmd`;
}