Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emulab
emulab-devel
Commits
c55f8e6f
Commit
c55f8e6f
authored
Jan 12, 2009
by
Leigh B. Stoller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add a debug mode that save the diff file.
parent
e31f881e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
4 deletions
+19
-4
db/GNUmakefile.in
db/GNUmakefile.in
+2
-2
db/dbfillcheck.in
db/dbfillcheck.in
+17
-2
No files found.
db/GNUmakefile.in
View file @
c55f8e6f
#
# EMULAB-COPYRIGHT
# Copyright (c) 2000-200
8
University of Utah and the Flux Group.
# Copyright (c) 2000-200
9
University of Utah and the Flux Group.
# All rights reserved.
#
SRCDIR = @srcdir@
...
...
@@ -43,7 +43,7 @@ SETUID_LIBX_SCRIPTS =
# configure if the .in file is changed.
#
all: $(BIN_SCRIPTS) $(SBIN_SCRIPTS) $(LIBEXEC_SCRIPTS) $(LIB_SCRIPTS) \
$(USERSBINS) $(USERLIBS) schemacheck
$(USERSBINS) $(USERLIBS) schemacheck
dbfillcheck
include $(TESTBED_SRCDIR)/GNUmakerules
...
...
db/dbfillcheck.in
View file @
c55f8e6f
...
...
@@ -2,10 +2,11 @@
#
# EMULAB-COPYRIGHT
# Copyright (c) 2000-2007 University of Utah and the Flux Group.
# Copyright (c) 2000-2007
, 2009
University of Utah and the Flux Group.
# All rights reserved.
#
use
strict
;
use
Getopt::
Std
;
#
# dbfillcheck - Make sure that the initial fill contents on the
...
...
@@ -14,6 +15,7 @@ use strict;
# the mysql server is not running, or the database does not exist)
# prevents us from telling if they differ or not.
#
my
$optlist
=
"
d
";
#
# Configure variables
...
...
@@ -28,6 +30,16 @@ my $tempdifffile = "/tmp/dbdiff.$$";
my
$tempnewfile
=
"
/tmp/dbdiff.new.$$
";
my
$tempoldfile
=
"
/tmp/dbdiff.old.$$
";
my
$exitcode
=
0
;
my
$debug
=
0
;
my
%options
=
();
if
(
!
getopts
(
$optlist
,
\
%options
))
{
die
("
*** $0:
\n
"
.
"
Usage: dbfillcheck [-d]
\n
");
}
if
(
defined
(
$options
{"
d
"}))
{
$debug
=
1
;
}
#
# Diff exits with 2 if a problem. We tell diff to ignore whitespace
...
...
@@ -73,8 +85,11 @@ if (!$?) {
# status
#
print
"
*** Your installed database is out of date with
$dbfill
\n
";
print
"
Differences are listed in
$tempdifffile
\n
"
if
(
$debug
);
print
"
To bring it up to date, run:
\n
";
print
"
mysqldump tbdb > tbdb.backup
\n
";
print
"
(cd db; mysql tbdb <
$master_fill
)
\n
";
unlink
(
$tempdifffile
);
unlink
(
$tempdifffile
)
if
(
!
$debug
);
exit
(
1
);
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment