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-stable
Commits
8b697bd3
Commit
8b697bd3
authored
Mar 09, 2001
by
Leigh B. Stoller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add -nologfile option to prevent log file creation. The web wrapper
script uses this option so ot can easily capture output.
parent
88dd6be3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
35 additions
and
11 deletions
+35
-11
tbsetup/tbprerun.in
tbsetup/tbprerun.in
+18
-4
tbsetup/tbrun.in
tbsetup/tbrun.in
+17
-7
No files found.
tbsetup/tbprerun.in
View file @
8b697bd3
...
...
@@ -21,14 +21,26 @@ $ENV{'PATH'} = "/usr/bin:$TBROOT/libexec:$TBROOT/libexec/ir"
push
(
@INC
,
$TBSETUPLIB
);
push
(
@INC
,
$TBIRLIB
);
# Turn off line buffering.
$|
=
1
;
require
libtbsetup
;
require
libir
;
require
'
ctime.pl
';
if
(
$#ARGV
!=
2
)
{
print
STDERR
"
Syntax: $0 pid eid ns_file
\n
";
if
(
$#ARGV
<
2
||
$#ARGV
>
3
||
(
$#ARGV
==
3
&&
$ARGV
[
0
]
ne
"
-nologfile
"))
{
print
STDERR
"
Syntax: $0 [-nologfile] pid eid ns_file
\n
";
exit
(
1
);
}
if
(
$#ARGV
==
3
)
{
shift
;
$dolog
=
0
;
}
else
{
$dolog
=
1
;
}
(
$pid
,
$eid
,
$nsfile
)
=
@ARGV
;
$prefix
=
&tbs_prefix
(
$nsfile
);
...
...
@@ -47,11 +59,13 @@ sub cleanup {
&tbs_exec
("
nfree
$eid
$pid
");
};
&tbs_initlog
(
$logfile
);
if
(
$dolog
)
{
&tbs_initlog
(
$logfile
);
&tbs_out
("
Log:
$logfile
\n
");
}
&tbs_out
("
Input:
$nsfile
\n
");
&tbs_out
("
Output:
$irfile
\n
");
&tbs_out
("
Log:
$logfile
\n
");
&tbs_out
("
\n
");
&tbs_out
("
Beginning pre run for
$pid
-
$eid
(
$nsfile
).
"
.
&ctime
(
time
)
.
"
\n
");
...
...
tbsetup/tbrun.in
View file @
8b697bd3
...
...
@@ -14,23 +14,33 @@ $ENV{'PATH'} = "$TBROOT/libexec:$TBROOT/libexec/ir"
.
"
:
$TBROOT
/libexec/ns2ir:
$TBROOT
/sbin:
$TBROOT
/bin:/usr/bin
";
push
(
@INC
,
$TBSETUPLIB
);
# Turn off line buffering.
$|
=
1
;
require
libtbsetup
;
require
'
ctime.pl
';
if
(
$#ARGV
!=
2
)
{
print
STDERR
"
Syntax: $0 pid eid ir_file
\n
";
if
(
$#ARGV
<
2
||
$#ARGV
>
3
||
(
$#ARGV
==
3
&&
$ARGV
[
0
]
ne
"
-nologfile
"))
{
print
STDERR
"
Syntax: $0 [-nologfile] pid eid ir_file
\n
";
exit
(
1
);
}
if
(
$#ARGV
==
3
)
{
shift
;
$dolog
=
0
;
}
else
{
$dolog
=
1
;
}
(
$pid
,
$eid
,
$irfile
)
=
@ARGV
;
$prefix
=
&tbs_prefix
(
$irfile
);
$logfile
=
"
$prefix
.log
";
&tbs_initlog
(
$logfile
);
#&tbs_out("Input: $irfile\n");
#&tbs_out("Log: $logfile\n");
#&tbs_out("\n");
if
(
$dolog
)
{
&tbs_initlog
(
$logfile
);
}
if
(
!
-
r
$irfile
)
{
&tbs_out
("
$irfile
does not exist or is not readable.
\n
");
...
...
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