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
a79b74a9
Commit
a79b74a9
authored
Sep 12, 2005
by
Russ Fish
Browse files
Cache the getmac output early on, while all interfaces are enabled.
parent
f52ed723
Changes
1
Hide whitespace changes
Inline
Side-by-side
tmcd/findif.c
View file @
a79b74a9
...
...
@@ -223,10 +223,18 @@ find_iface(char *macaddr)
static
int
find_iface
(
char
*
macaddr
)
{
#if 1
/* We cache the getmac output early on in rc.cygwin, while all of the
* interfaces are still enabled. Later, we get no MAC info.
*/
FILE
*
fp
=
fopen
(
"/var/emulab/boot/getmac-cache"
,
"r"
);
#else
/* We copy the Windows getmac.exe and library framedyn.dll into $BINDIR
* because our path gets "untainted" into a pure Unix form in rc scripts.
*/
FILE
*
fp
=
popen
(
"bash -c 'cd /usr/local/etc/emulab; ./getmac /nh /v /fo csv'"
,
"r"
);
FILE
*
fp
=
popen
(
"bash -c 'cd /usr/local/etc/emulab; ./getmac /nh /v /fo csv'"
,
"r"
);
#endif
char
buf
[
BUFSIZ
];
while
(
fgets
(
buf
,
BUFSIZ
,
fp
)
!=
NULL
)
{
...
...
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