mirror of
https://git.proxmox.com/git/mirror_lxc
synced 2025-08-08 08:16:20 +00:00
Fix wait_for_bridge() in sysvinit script
Fix parsing of /etc/lxc/default.conf, i. e. ignore comments, and don't require whitespace left and right of the equal sign. Make the early return actually work. Signed-off-by: Robert Vogelgesang <vogel@users.sourceforge.net> Acked-by: Stéphane Graber <stgraber@ubuntu.com>
This commit is contained in:
parent
bfd483d43a
commit
3d3bc9ed7b
@ -27,8 +27,10 @@ wait_for_bridge()
|
|||||||
{
|
{
|
||||||
[ -f /etc/lxc/default.conf ] || { return 0; }
|
[ -f /etc/lxc/default.conf ] || { return 0; }
|
||||||
|
|
||||||
BRNAME=`grep lxc.network.link /etc/lxc/default.conf |awk '{print $3}'`
|
BRNAME=`grep '^[ ]*lxc.network.link' /etc/lxc/default.conf | sed 's/^.*=[ ]*//'`
|
||||||
[ -n $BRNAME ] || { return 0; }
|
if [ -z "$BRNAME" ]; then
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
|
||||||
for try in `seq 1 30`; do
|
for try in `seq 1 30`; do
|
||||||
ifconfig -a |grep "^$BRNAME" >/dev/null 2>&1
|
ifconfig -a |grep "^$BRNAME" >/dev/null 2>&1
|
||||||
|
Loading…
Reference in New Issue
Block a user