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-stable
Commits
0c285ace
Commit
0c285ace
authored
Sep 21, 2007
by
Leigh B. Stoller
Browse files
Add a silent option and redirect the "dot" output to /dev/null. Not
worth seeing.
parent
641b2dce
Changes
2
Hide whitespace changes
Inline
Side-by-side
tbsetup/template_create.in
View file @
0c285ace
...
...
@@ -783,7 +783,8 @@ if ($modify) {
#
# Generate the graph for the template.
#
system
("
$makegraph
$guid
");
print
"
Generating graph
\n
";
system
("
$makegraph
-s
$guid
");
fatal
(
-
1
,
"
Error generating template graph.
")
if
(
$?
);
...
...
tbsetup/template_graph.in
View file @
0c285ace
...
...
@@ -22,9 +22,10 @@ sub usage()
"
<guid> - GUID to graph
\n
");
exit
(
-
1
);
}
my
$optlist
=
"
p:z:d
";
my
$optlist
=
"
p:z:d
s
";
my
%options
=
();
my
$debug
=
0
;
my
$silent
=
0
;
my
$prefix
=
"
/tmp/dot$$
";
my
$scale
=
1.0
;
my
$zoom
;
...
...
@@ -293,8 +294,10 @@ close(DOT);
#
# Now run dot and generate both a gif and an image map file.
#
system
("
$DOT
-Tgif -o
$giffile
$dotfile
");
system
("
$DOT
-Tcmapx -o
$imapfile
$dotfile
");
my
$redirect
=
(
$silent
?
"
> /dev/null 2>&1
"
:
"");
system
("
$DOT
-Tgif -o
$giffile
$dotfile
$redirect
");
system
("
$DOT
-Tcmapx -o
$imapfile
$dotfile
$redirect
");
#
# Grab the input data.
...
...
@@ -361,6 +364,9 @@ sub ParseArgs()
if
(
defined
(
$options
{"
d
"}))
{
$debug
=
1
;
}
if
(
defined
(
$options
{"
s
"}))
{
$silent
=
1
;
}
if
(
defined
(
$options
{"
z
"}))
{
$zoom
=
$options
{"
z
"};
...
...
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