From b5b4c667cdc0fb7def46b161b2ae8aaceec38b57 Mon Sep 17 00:00:00 2001 From: lissav Date: Wed, 1 Sep 2010 14:10:18 +0000 Subject: [PATCH] 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 --- xCAT-server/sbin/xcatd | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/xCAT-server/sbin/xcatd b/xCAT-server/sbin/xcatd index d345fb26f..58b58a378 100755 --- a/xCAT-server/sbin/xcatd +++ b/xCAT-server/sbin/xcatd @@ -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`; }