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
f225870e
Commit
f225870e
authored
Apr 29, 2003
by
Robert Ricci
Browse files
Pass the gid into the parser, so that people can use it in their NS
files.
parent
59d5e48f
Changes
2
Hide whitespace changes
Inline
Side-by-side
tbsetup/ns2ir/parse.tcl.in
View file @
f225870e
...
...
@@ -141,8 +141,8 @@ if {${GLOBALS::anonymous} && ! ${GLOBALS::impotent}} {
if
{${
GLOBALS
::
anonymous
}
&&
([
llength
$
argv
]
!= 1)} {
puts
stderr
"Syntax: $argv0 \[-q\] -n -a ns_file"
exit
1
}
elseif
{(
! ${GLOBALS::anonymous}) && ([llength $argv] !=
3
)} {
puts
stderr
"Syntax: $argv0 \[-q\] \[-n \[-a\]\] pid eid ns_file"
}
elseif
{(
! ${GLOBALS::anonymous}) && ([llength $argv] !=
4
)} {
puts
stderr
"Syntax: $argv0 \[-q\] \[-n \[-a\]\] pid
gid
eid ns_file"
exit
1
}
...
...
@@ -151,12 +151,14 @@ namespace eval GLOBALS {
#
Remaining
arguments
if
{$
anonymous
}
{
variable
pid
"PID"
variable
gid
"GID"
variable
eid
"EID"
variable
nsfile
[
lindex
$
argv
0
]
}
else
{
variable
pid
[
lindex
$
argv
0
]
variable
eid
[
lindex
$
argv
1
]
variable
nsfile
[
lindex
$
argv
2
]
variable
gid
[
lindex
$
argv
1
]
variable
eid
[
lindex
$
argv
2
]
variable
nsfile
[
lindex
$
argv
3
]
}
#
This
is
used
to
name
class
instances
by
the
variables
they
...
...
tbsetup/tbprerun.in
View file @
f225870e
...
...
@@ -79,6 +79,11 @@ if (! ($state = ExpState($pid, $eid))) {
"
No such experiment
$pid
/
$eid
\n
");
}
if
(
!
(
$gid
=
ExpGroup
(
$pid
,
$eid
)))
{
die
("
*** $0:
\n
"
.
"
Unable to get group for
$pid
/
$eid
\n
");
}
if
(
!
$modify
)
{
if
(
!
$force
&&
$state
ne
EXPTSTATE_NEW
)
{
die
("
*** $0:
\n
"
.
...
...
@@ -119,7 +124,7 @@ sub cleanup {
# and tb-* handling.
print
"
Running parser ...
"
.
TBTimeStamp
()
.
"
\n
";
TBDebugTimeStamp
("
parser started
");
if
(
system
("
parse-ns
$pid
$eid
$nsfile
"))
{
if
(
system
("
parse-ns
$pid
$gid
$eid
$nsfile
"))
{
cleanup
();
die
("
*** $0:
\n
"
.
"
Parsing failed!
\n
");
...
...
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