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
b7c36a1f
Commit
b7c36a1f
authored
Jan 04, 2011
by
Mike Hibler
Browse files
Make work properly in FreeBSD 8.x
parent
68190010
Changes
1
Hide whitespace changes
Inline
Side-by-side
tmcd/freebsd/delaysetup
View file @
b7c36a1f
#!/usr/bin/perl -w
#
# EMULAB-COPYRIGHT
# Copyright (c) 2000-20
09
University of Utah and the Flux Group.
# Copyright (c) 2000-20
11
University of Utah and the Flux Group.
# All rights reserved.
#
use
English
;
...
...
@@ -276,7 +276,11 @@ sub DelaySetup
}
# polling
print
DEL
"
if [ -n
\"
`sysctl kern.polling.enable 2>/dev/null`
\"
]; then
\n
";
if
(
$FBSD_VERSION
>=
8
)
{
print
DEL
"
if [ -n
\"
`sysctl kern.polling.phase 2>/dev/null`
\"
]; then
\n
";
}
else
{
print
DEL
"
if [ -n
\"
`sysctl kern.polling.enable 2>/dev/null`
\"
]; then
\n
";
}
if
(
$FBSD_VERSION
>=
6
)
{
foreach
my
$bridge
(
@bridges
)
{
my
(
undef
,
$if1
,
$if2
)
=
@$bridge
;
...
...
@@ -424,9 +428,15 @@ sub DelaySetup
# in question. For older FreeBSDs, we just have to turn it on
# globally.
#
print
DEL
"
if [ -n
\"
`sysctl kern.polling.enable 2>/dev/null`
\"
]; then
\n
";
if
(
$FBSD_VERSION
>=
8
)
{
print
DEL
"
if [ -n
\"
`sysctl kern.polling.phase 2>/dev/null`
\"
]; then
\n
";
}
else
{
print
DEL
"
if [ -n
\"
`sysctl kern.polling.enable 2>/dev/null`
\"
]; then
\n
";
}
if
(
$FBSD_VERSION
>=
6
)
{
print
DEL
"
sysctl -w kern.polling.enable=0
\n
";
if
(
$FBSD_VERSION
<
8
)
{
print
DEL
"
sysctl -w kern.polling.enable=0
\n
";
}
foreach
my
$bridge
(
@bridges
)
{
my
(
undef
,
$if1
,
$if2
)
=
@$bridge
;
print
DEL
"
ifconfig
$if1
polling
\n
";
...
...
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