Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
emulab-devel
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
111
Issues
111
List
Boards
Labels
Milestones
Merge Requests
4
Merge Requests
4
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
emulab
emulab-devel
Commits
77fd68e8
Commit
77fd68e8
authored
Mar 02, 2006
by
Leigh Stoller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add code to push the site_mapping table over too.
parent
821e973e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
0 deletions
+17
-0
pelab/db/pelab_dbpush.in
pelab/db/pelab_dbpush.in
+17
-0
No files found.
pelab/db/pelab_dbpush.in
View file @
77fd68e8
...
@@ -27,6 +27,7 @@ my $TB = "@prefix@";
...
@@ -27,6 +27,7 @@ my $TB = "@prefix@";
my
$TBOPS
=
"
@TBOPSEMAIL
@
";
my
$TBOPS
=
"
@TBOPSEMAIL
@
";
my
$CURL
=
"
/usr/local/bin/curl
";
my
$CURL
=
"
/usr/local/bin/curl
";
my
$DATAPOSCGI
=
"
http://www.datapository.net/input/upload.cgi
";
my
$DATAPOSCGI
=
"
http://www.datapository.net/input/upload.cgi
";
my
$MAXAGE
=
(
24
*
60
*
60
);
my
$PWDFILE
=
"
/usr/testbed/etc/pelabdb.pwd
";
my
$PWDFILE
=
"
/usr/testbed/etc/pelabdb.pwd
";
my
$tempfile
=
"
/var/tmp/testbed_pelab_dbpush_tempfile
";
my
$tempfile
=
"
/var/tmp/testbed_pelab_dbpush_tempfile
";
...
@@ -116,6 +117,21 @@ if (TBDBConnect($DBNAME, $DBUSER, $dbpwd) < 0) {
...
@@ -116,6 +117,21 @@ if (TBDBConnect($DBNAME, $DBUSER, $dbpwd) < 0) {
fatal
("
Could not connect to DB!
");
fatal
("
Could not connect to DB!
");
}
}
unlink
("
${tempfile}
.site_mapping
")
if
(
-
e
"
${tempfile}
.site_mapping
");
#
# Grab all entries and store to the file
#
DBQueryFatal
("
select * from site_mapping
"
.
"
into outfile '
${tempfile}
.site_mapping'
"
.
"
fields terminated by ' '
");
SendToDatapository
("
site_mapping
");
unlink
("
${tempfile}
.site_mapping
")
if
(
-
e
"
${tempfile}
.site_mapping
"
&&
!
$debug
);
#
#
# Get the last index we archived out.
# Get the last index we archived out.
#
#
...
@@ -246,6 +262,7 @@ sub SendToDatapository($)
...
@@ -246,6 +262,7 @@ sub SendToDatapository($)
elsif
(
$_
=~
/^SUCCESS/
)
{
elsif
(
$_
=~
/^SUCCESS/
)
{
$success
=
1
;
$success
=
1
;
}
}
print
$_
;
}
}
close
(
CHILD_READER
);
close
(
CHILD_READER
);
waitpid
(
$childpid
,
0
);
waitpid
(
$childpid
,
0
);
...
...
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