Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
emulab
emulab-devel
Commits
c0b2800b
Commit
c0b2800b
authored
Oct 31, 2000
by
Leigh B. Stoller
Browse files
Simple wrapper scripts to be invoked from the web interface.
parent
242ebd68
Changes
3
Hide whitespace changes
Inline
Side-by-side
Makefile
View file @
c0b2800b
...
...
@@ -49,6 +49,8 @@ install: all
install
-c
tbsetup/tbrun.tcl
/usr/testbed/bin/tbrun
install
-c
tbsetup/vpower
/usr/testbed/bin
install
-c
tbsetup/vsnmpit
/usr/testbed/bin
install
-c
tbsetup/tbdoit
/usr/testbed/bin
install
-c
tbsetup/tbstopit
/usr/testbed/bin
#XXX - hackish
rm
-rf
/usr/testbed/lib/tbsetup
rm
-rf
/usr/testbed/lib/db
...
...
tbsetup/tbdoit
0 → 100755
View file @
c0b2800b
#!/usr/bin/perl
#
# This gets invoked from the Web interface. CD into the proper directory
# and do the tb stuff.
#
# usage: tbdoit <path to working directory> <nsfile>
#
my
$tbdir
=
"
/usr/testbed/bin/
";
if
(
@ARGV
!=
2
)
{
print
STDOUT
"
Usage: tbdoit <working dir> <project> <file>
\n
";
exit
(
-
1
);
}
my
$workdir
=
$ARGV
[
0
];
my
$project
=
$ARGV
[
1
];
my
$nsfile
=
$ARGV
[
2
];
my
$base
=
"
$nsfile
";
$_
=
$nsfile
;
s/\.ns//g
;
$base
=
$_
;
my
$irfile
=
"
$base
.ir
";
my
$repfile
=
"
$base
.report
";
#
# We run the TB stuff in the given directory.
#
if
(
!
chdir
(
$workdir
))
{
print
STDOUT
"
Could not chdir to
$workdir
\n
";
exit
(
-
1
);
}
print
STDOUT
"
Running tbprerun with arguments:
$project
$nsfile
\n
";
if
(
system
("
$tbdir
/tbprerun
$project
$nsfile
")
==
0
)
{
print
STDOUT
"
tbprerun failed!
\n
";
exit
(
-
1
);
}
print
STDOUT
"
Running tbrun with arguments:
$irfile
\n
";
if
(
system
("
$tbdir
/tbrun
$irfile
")
==
0
)
{
print
STDOUT
"
tbrun failed!
\n
";
exit
(
-
1
);
}
print
STDOUT
"
Running tbreport with arguments:
$irfile
-v >&
$repfile
\n
";
if
(
system
("
$tbdir
/tbreport -v
$irfile
>&
$repfile
")
==
0
)
{
print
STDOUT
"
tbreport failed!
\n
";
exit
(
-
1
);
}
print
STDOUT
"
Setup Success
\n
";
exit
0
;
tbsetup/tbstopit
0 → 100755
View file @
c0b2800b
#!/usr/bin/perl
#
# This gets invoked from the Web interface. CD into the proper directory
# and do the tb stuff.
#
# usage: tbstopit <path to working directory> <irfile>
#
my
$tbdir
=
"
/usr/testbed/bin/
";
if
(
@ARGV
!=
2
)
{
print
STDOUT
"
Usage: tbstopit <working dir> <irfile>
\n
";
exit
(
-
1
);
}
my
$workdir
=
$ARGV
[
0
];
my
$irfile
=
$ARGV
[
1
];
#
# We run the TB stuff in the given directory.
#
if
(
!
chdir
(
$workdir
))
{
print
STDOUT
"
Could not chdir to
$workdir
\n
";
exit
(
-
1
);
}
print
STDOUT
"
Running tbend with arguments:
$irfile
\n
";
if
(
system
("
$tbdir
/tbend
$irfile
")
==
0
)
{
print
STDOUT
"
tbend failed!
\n
";
exit
(
-
1
);
}
print
STDOUT
"
Termination Success
\n
";
exit
0
;
Write
Preview
Supports
Markdown
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