Skip to content
GitLab
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
b9bddb24
Commit
b9bddb24
authored
Oct 07, 2003
by
Leigh B. Stoller
Browse files
More piddly little fixes to get vnodes working properly. Sheesh.
parent
6614fe87
Changes
3
Hide whitespace changes
Inline
Side-by-side
tmcd/common/libtmcc.pm
View file @
b9bddb24
...
...
@@ -44,6 +44,7 @@ BEGIN
my
$TMCCBIN
=
"
$BINDIR
/tmcc.bin
";
my
$PROXYDEF
=
"
$BOOTDIR
/proxypath
";
my
$debug
=
0
;
my
$beproxy
=
0
;
#
# Configuration. The importer of this library should set these values
...
...
@@ -60,6 +61,7 @@ my $debug = 0;
"
subnode
"
=>
undef
,
"
keyfile
"
=>
undef
,
"
timeout
"
=>
undef
,
"
logfile
"
=>
undef
,
);
#
...
...
@@ -176,6 +178,7 @@ sub optionstring($%)
}
if
(
$opthash
{"
beproxy
"})
{
$options
.=
"
-x
"
.
$opthash
{"
beproxy
"};
$beproxy
=
1
;
}
if
(
$opthash
{"
dounix
"})
{
$options
.=
"
-l
"
.
$opthash
{"
dounix
"};
...
...
@@ -183,6 +186,9 @@ sub optionstring($%)
if
(
defined
(
$opthash
{"
server
"}))
{
$options
.=
"
-s
"
.
$opthash
{"
server
"};
}
if
(
defined
(
$opthash
{"
subnode
"}))
{
$options
.=
"
-n
"
.
$opthash
{"
subnode
"};
}
if
(
defined
(
$opthash
{"
portnum
"}))
{
$options
.=
"
-p
"
.
$opthash
{"
portnum
"};
}
...
...
@@ -195,6 +201,9 @@ sub optionstring($%)
if
(
defined
(
$opthash
{"
timeout
"}))
{
$options
.=
"
-t
"
.
$opthash
{"
timeout
"};
}
if
(
defined
(
$opthash
{"
logfile
"}))
{
$options
.=
"
-o
"
.
$opthash
{"
logfile
"};
}
return
$options
;
}
...
...
@@ -227,6 +236,13 @@ sub runtmcc ($;$$%)
print
STDERR
"
$string
\n
";
}
#
# Special case. If the proxy option is given, exec and forget.
#
if
(
$beproxy
)
{
exec
(
$string
);
die
("
exec failure:
$string
\n
");
}
if
(
!
open
(
TM
,
"
$string
|
"))
{
print
STDERR
"
Cannot start TMCC: $!
\n
";
return
-
1
;
...
...
@@ -268,7 +284,7 @@ sub tmcc ($;$$%)
close
(
PP
);
if
(
$ppath
=~
/^([-\w\.\/]+)$/
)
{
$config
{"
dounix
"}
=
$
ppath
;
$config
{"
dounix
"}
=
$
1
;
}
else
{
die
("
Bad data in tmccproxy path:
$ppath
");
...
...
tmcd/common/tmcc.pl
View file @
b9bddb24
...
...
@@ -24,9 +24,10 @@ sub usage()
print
STDERR
"
-l path Use named unix domain socket instead of TCP
\n
";
print
STDERR
"
-t timeout Timeout waiting for the controller.
\n
";
print
STDERR
"
-x path Be a proxy using the unix domain socket
\n
";
print
STDERR
"
-o path Specify log file name for -x option
\n
";
exit
(
1
);
}
my
$optlist
=
"
ds:p:v:n:k:ul:t:x:
";
my
$optlist
=
"
ds:p:v:n:k:ul:t:x:
o:
";
my
$debug
=
0
;
my
$CMD
;
my
$ARGS
;
...
...
@@ -107,11 +108,15 @@ sub ParseOptions()
if
(
defined
(
$options
{"
x
"}))
{
libtmcc::
configtmcc
("
beproxy
"
,
$options
{"
x
"});
}
usage
()
if
(
!
@ARGV
);
$CMD
=
shift
(
@ARGV
);
if
(
defined
(
$options
{"
o
"}))
{
libtmcc::
configtmcc
("
logfile
"
,
$options
{"
o
"});
}
$CMD
=
"";
$ARGS
=
"";
if
(
@ARGV
)
{
$CMD
=
shift
(
@ARGV
);
}
if
(
@ARGV
)
{
$ARGS
=
"
@ARGV
";
}
...
...
tmcd/tmcc.c
View file @
b9bddb24
...
...
@@ -100,6 +100,7 @@ char *usagestr =
" -l path Use named unix domain socket instead of TCP
\n
"
" -t timeout Timeout waiting for the controller.
\n
"
" -x path Be a tmcc proxy, using the named unix domain socket
\n
"
" -o logfile Specify log file name for -x option
\n
"
"
\n
"
;
void
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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