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
64fe3bdf
Commit
64fe3bdf
authored
Aug 29, 2006
by
Leigh B. Stoller
Browse files
Minor fix for operating within virtual nodes; lok for TMCCVNODEID env
variable and pass along as argument to tmcc.
parent
612c13e3
Changes
2
Hide whitespace changes
Inline
Side-by-side
lib/libtb/tmcc.c
View file @
64fe3bdf
...
...
@@ -19,19 +19,29 @@
int
tmcc
(
char
*
fmt
,
char
*
ret
,
int
retlen
,
...)
{
char
buf
[
2
*
BUFSIZ
],
*
bp
=
ret
;
char
buf
[
2
*
BUFSIZ
],
*
bp
=
ret
,
*
ep
;
va_list
ap
;
FILE
*
fp
;
int
retval
=
0
;
int
count
=
0
;
/* See if this is inside a vnode */
if
((
ep
=
getenv
(
"TMCCVNODEID"
))
==
NULL
)
ep
=
""
;
/* Need to tack on the path to tmcc */
if
(
strlen
(
TMCC
)
+
strlen
(
fmt
)
+
1
>
sizeof
(
buf
))
{
if
(
strlen
(
TMCC
)
+
strlen
(
fmt
)
+
strlen
(
ep
)
+
10
>
sizeof
(
buf
))
{
errno
=
ENOMEM
;
return
-
1
;
}
strcpy
(
buf
,
TMCC
);
strcat
(
buf
,
" "
);
if
(
strlen
(
ep
))
{
strcat
(
buf
,
"-n "
);
strcat
(
buf
,
ep
);
strcat
(
buf
,
" "
);
}
strcat
(
buf
,
fmt
);
va_start
(
ap
,
retlen
);
...
...
tmcd/plab/rc.vinit
View file @
64fe3bdf
#!/bin/sh
#
# EMULAB-COPYRIGHT
# Copyright (c) 2000-2002 University of Utah and the Flux Group.
# Copyright (c) 2000-2002
, 2006
University of Utah and the Flux Group.
# All rights reserved.
#
...
...
@@ -30,6 +30,10 @@ else
exit
1
;
fi
# Pass this along for tmcc clients.
TMCCVNODEID
=
$VNODEID
export
TMCCVNODEID
# See how we were called.
case
"
$1
"
in
start
)
...
...
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