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
97377080
Commit
97377080
authored
May 15, 2002
by
Shashi Guruprasad
Browse files
fixes for dotrafficconfig() changes to store tmcc cmd output in /etc/testbed
parent
23142383
Changes
2
Hide whitespace changes
Inline
Side-by-side
tmcd/common/libsetup.pm
View file @
97377080
...
...
@@ -1158,21 +1158,28 @@ sub dotrafficconfig()
}
CLOSETMCC
(
$TM
);
#
# XXX hack: workaround for tmcc cmd failure inside TCL
# storing the output of a few tmcc commands in
# $SETUPDIR files for use by NSE
#
open
(
NSECFG
,
"
>
$SETUPDIR
/tmcc.nseconfigs
"
)
or
die
"
Cannot open file
$SETUPDIR
/tmcc.nseconfigs: $!
";
$TM
=
OPENTMCC
(
TMCCCMD_NSECONFIGS
);
$record_sep
=
$/
;
undef
(
$/
);
my
$nseconfig
=
<
$TM
>
;
$/
=
$record_sep
;
print
NSECFG
$nseconfig
;
CLOSETMCC
(
$TM
);
close
(
NSECFG
);
# XXX hack: need a separate section for starting up NSE when we
# support simulated nodes
if
(
!
$startnse
)
{
# start NSE if 'tmcc nseconfigs' is not empty
$TM
=
OPENTMCC
(
TMCCCMD_NSECONFIGS
);
$record_sep
=
$/
;
undef
(
$/
);
my
$nseconfig
=
<
$TM
>
;
$/
=
$record_sep
;
if
(
$nseconfig
)
{
print
NSECFG
$nseconfig
;
# start NSE if 'tmcc nseconfigs' is not empty
if
(
!
$didopen
)
{
open
(
RC
,
"
>
"
.
TMTRAFFICCONFIG
)
or
die
("
Could not open
"
.
TMTRAFFICCONFIG
.
"
: $!
");
...
...
@@ -1181,9 +1188,7 @@ sub dotrafficconfig()
}
print
RC
"
$SETUPDIR
/startnse &
\n
";
}
CLOSETMCC
(
$TM
)
}
close
(
NSECFG
);
if
(
$didopen
)
{
printf
RC
"
%s %s
\n
",
TMCC
(),
TMCCCMD_READY
();
...
...
tmcd/libsetup.pm
View file @
97377080
...
...
@@ -1158,21 +1158,28 @@ sub dotrafficconfig()
}
CLOSETMCC
(
$TM
);
#
# XXX hack: workaround for tmcc cmd failure inside TCL
# storing the output of a few tmcc commands in
# $SETUPDIR files for use by NSE
#
open
(
NSECFG
,
"
>
$SETUPDIR
/tmcc.nseconfigs
"
)
or
die
"
Cannot open file
$SETUPDIR
/tmcc.nseconfigs: $!
";
$TM
=
OPENTMCC
(
TMCCCMD_NSECONFIGS
);
$record_sep
=
$/
;
undef
(
$/
);
my
$nseconfig
=
<
$TM
>
;
$/
=
$record_sep
;
print
NSECFG
$nseconfig
;
CLOSETMCC
(
$TM
);
close
(
NSECFG
);
# XXX hack: need a separate section for starting up NSE when we
# support simulated nodes
if
(
!
$startnse
)
{
# start NSE if 'tmcc nseconfigs' is not empty
$TM
=
OPENTMCC
(
TMCCCMD_NSECONFIGS
);
$record_sep
=
$/
;
undef
(
$/
);
my
$nseconfig
=
<
$TM
>
;
$/
=
$record_sep
;
if
(
$nseconfig
)
{
print
NSECFG
$nseconfig
;
# start NSE if 'tmcc nseconfigs' is not empty
if
(
!
$didopen
)
{
open
(
RC
,
"
>
"
.
TMTRAFFICCONFIG
)
or
die
("
Could not open
"
.
TMTRAFFICCONFIG
.
"
: $!
");
...
...
@@ -1181,9 +1188,7 @@ sub dotrafficconfig()
}
print
RC
"
$SETUPDIR
/startnse &
\n
";
}
CLOSETMCC
(
$TM
)
}
close
(
NSECFG
);
if
(
$didopen
)
{
printf
RC
"
%s %s
\n
",
TMCC
(),
TMCCCMD_READY
();
...
...
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