Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
lxc
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chen Yisong
lxc
Commits
215fff92
Unverified
Commit
215fff92
authored
Mar 14, 2017
by
Harald Dunkel
Committed by
Stéphane Graber
Mar 20, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix lxc-containers to support multiple bridges
Signed-off-by:
Harald Dunkel
<
harald.dunkel@aixigo.de
>
parent
e0e26721
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
6 deletions
+7
-6
lxc-containers.in
config/init/common/lxc-containers.in
+7
-6
No files found.
config/init/common/lxc-containers.in
View file @
215fff92
...
@@ -51,7 +51,7 @@ fi
...
@@ -51,7 +51,7 @@ fi
# to start
# to start
wait_for_bridge
()
wait_for_bridge
()
{
{
local
BRNAME try flags
local
BRNAME try flags
br
[
-f
"
$sysconfdir
"
/lxc/default.conf
]
||
{
return
0
;
}
[
-f
"
$sysconfdir
"
/lxc/default.conf
]
||
{
return
0
;
}
BRNAME
=
`
grep
'^[ ]*lxc.network.link'
"
$sysconfdir
"
/lxc/default.conf |
sed
's/^.*=[ ]*//'
`
BRNAME
=
`
grep
'^[ ]*lxc.network.link'
"
$sysconfdir
"
/lxc/default.conf |
sed
's/^.*=[ ]*//'
`
...
@@ -60,11 +60,12 @@ wait_for_bridge()
...
@@ -60,11 +60,12 @@ wait_for_bridge()
fi
fi
for
try
in
`
seq
1 30
`
;
do
for
try
in
`
seq
1 30
`
;
do
if
[
-r
/sys/class/net/
$BRNAME
/flags
]
;
then
for
br
in
${
BRNAME
}
;
do
read
flags < /sys/class/net/
$BRNAME
/flags
[
-r
/sys/class/net/
${
br
}
/flags
]
||
{
sleep
1
;
continue
2
;
}
[
$((
flags
&
0
x1
))
-eq
1
]
&&
{
return
0
;
}
read
flags < /sys/class/net/
${
br
}
/flags
fi
[
$((
flags
&
0
x1
))
-eq
1
]
||
{
sleep
1
;
continue
2
;
}
sleep
1
done
return
0
done
done
}
}
...
...
Write
Preview
Markdown
is supported
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