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
e7fa89d0
Commit
e7fa89d0
authored
Jan 23, 2006
by
Timothy Stack
Browse files
The bridge(4) sysctls changed a bit from FreeBSD 4 to 5.
parent
fee2510d
Changes
1
Hide whitespace changes
Inline
Side-by-side
tmcd/freebsd/delaysetup
View file @
e7fa89d0
#!/usr/bin/perl -w
#
# EMULAB-COPYRIGHT
# Copyright (c) 2000-200
5
University of Utah and the Flux Group.
# Copyright (c) 2000-200
6
University of Utah and the Flux Group.
# All rights reserved.
#
use
English
;
...
...
@@ -72,6 +72,16 @@ if (@ARGV) {
}
sub
checkkernel
($);
$FBSD_VERSION
=
`
uname -v
`;
if
(
$FBSD_VERSION
=~
/FreeBSD ([0-9]).*/
)
{
$FBSD_VERSION
=
int
(
$
1
);
}
else
{
die
("
*** $0:
\n
"
.
"
Cannot determine version
\n
");
}
#
# Delay node configuration goop.
#
...
...
@@ -150,9 +160,16 @@ sub DelaySetup
print
DEL
"
#!/bin/sh
\n
";
# Turn these off before setting bridge_cfg.
print
DEL
"
sysctl -w net.link.ether.bridge=0
\n
";
print
DEL
"
sysctl -w net.link.ether.bridge_ipfw=0
\n
";
print
DEL
"
sysctl -w net.link.ether.bridge_cfg=
";
if
(
$FBSD_VERSION
<=
4
)
{
print
DEL
"
sysctl -w net.link.ether.bridge=0
\n
";
print
DEL
"
sysctl -w net.link.ether.bridge_ipfw=0
\n
";
print
DEL
"
sysctl -w net.link.ether.bridge_cfg=
";
}
else
{
print
DEL
"
sysctl -w net.link.ether.bridge.enable=0
\n
";
print
DEL
"
sysctl -w net.link.ether.bridge.ipfw=0
\n
";
print
DEL
"
sysctl -w net.link.ether.bridge.cfg=
";
}
foreach
$delay
(
@delays
)
{
$delay
=~
/DELAY INT0=([\d\w]+) INT1=([\d\w]+) /
;
...
...
@@ -164,8 +181,14 @@ sub DelaySetup
}
print
DEL
"
\n
";
# Now turn them back on.
print
DEL
"
sysctl -w net.link.ether.bridge=1
\n
";
print
DEL
"
sysctl -w net.link.ether.bridge_ipfw=1
\n
";
if
(
$FBSD_VERSION
<=
4
)
{
print
DEL
"
sysctl -w net.link.ether.bridge=1
\n
";
print
DEL
"
sysctl -w net.link.ether.bridge_ipfw=1
\n
";
}
else
{
print
DEL
"
sysctl -w net.link.ether.bridge.enable=1
\n
";
print
DEL
"
sysctl -w net.link.ether.bridge.ipfw=1
\n
";
}
print
DEL
"
ipfw -f flush
\n
";
#
...
...
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