Commit f3d49948 authored by Russ Fish's avatar Russ Fish

Minor fixups.

parent 661ed1f6
...@@ -43,19 +43,13 @@ sub DumpDBGoo(); ...@@ -43,19 +43,13 @@ sub DumpDBGoo();
my $TB = "@prefix@"; my $TB = "@prefix@";
my $TBOPS = "@TBOPSEMAIL@"; my $TBOPS = "@TBOPSEMAIL@";
my $CONTROL = "@USERNODE@"; my $CONTROL = "@USERNODE@";
my $DBNAME = "@TBDBNAME@";
my $TBOPSPID = TBOPSPID(); my $TBOPSPID = TBOPSPID();
my $SSH = "$TB/bin/sshtb"; my $SSH = "$TB/bin/sshtb";
my $nodereboot = "$TB/bin/node_reboot"; my $nodereboot = "$TB/bin/node_reboot";
my $makeconf = "$TB/sbin/dhcpd_makeconf"; my $makeconf = "$TB/sbin/dhcpd_makeconf";
my $nodewait = "$TB/sbin/node_statewait"; my $nodewait = "$TB/sbin/node_statewait";
my $snmpit = "$TB/bin/snmpit"; my $snmpit = "$TB/bin/snmpit";
my $isvers5 = system("mysql -V | egrep -q -s 'Distrib 5.'") == 0;
my $extraopts = ($isvers5 ? "--skip-quote-names" : "");
#
# XXX: Requires that mysqldump be in caller's $PATH - probably an OK
# assumption, but maybe not always
#
my $mysqldump = "mysqldump -d $extraopts $DBNAME";
# Locals # Locals
my $elabinelab; my $elabinelab;
...@@ -940,7 +934,17 @@ sub DumpDBGoo() ...@@ -940,7 +934,17 @@ sub DumpDBGoo()
# is compatible with the sql/database-create.sql schema file there, *before* # is compatible with the sql/database-create.sql schema file there, *before*
# loading it into the db. Added/removed columns would misalign row data. # loading it into the db. Added/removed columns would misalign row data.
# #
system("$mysqldump 2> /dev/null > $expdir/outer_db_schema"); my $schemafile = "$expdir/outer_db_schema";
system("rm -f $schemafile")
if (-f $schemafile);
my $isvers5 = system("mysql -V | egrep -q -s 'Distrib 5.'") == 0;
my $extraopts = ($isvers5 ? "--skip-quote-names" : "");
#
# XXX: Requires that mysqldump be in caller's $PATH - probably an OK
# assumption, but maybe not always
#
my $mysqldump = "mysqldump -d $extraopts $DBNAME";
system("$mysqldump 2> /dev/null > $schemafile");
# #
# Tar up the directory and send it over to (real) ops. # Tar up the directory and send it over to (real) ops.
......
...@@ -1116,7 +1116,7 @@ sub SetupBossNode() ...@@ -1116,7 +1116,7 @@ sub SetupBossNode()
if (!$NOSETUP) { if (!$NOSETUP) {
print "Check for db schema mismatch before we go any further\n"; print "Check for db schema mismatch before we go any further\n";
my $testbed_srcdir = "${TBDIR}/testbed/src"; my $testbed_srcdir = "${TBDIR}/testbed/src/testbed";
my $schemadiff = "$testbed_srcdir/utils/schemadiff"; my $schemadiff = "$testbed_srcdir/utils/schemadiff";
my $master_schema = "$testbed_srcdir/sql/database-create.sql"; my $master_schema = "$testbed_srcdir/sql/database-create.sql";
my $outer_schema = "$stuffdir/outer_db_schema"; my $outer_schema = "$stuffdir/outer_db_schema";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment