Commit be1d88e6 by Robert Vogelgesang Committed by Stéphane Graber

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: 's avatarRobert Vogelgesang <vogel@users.sourceforge.net> Acked-by: 's avatarStéphane Graber <stgraber@ubuntu.com>
parent 5291ed9e
......@@ -27,8 +27,10 @@ wait_for_bridge()
{
[ -f /etc/lxc/default.conf ] || { return 0; }
BRNAME=`grep lxc.network.link /etc/lxc/default.conf |awk '{print $3}'`
[ -n $BRNAME ] || { return 0; }
BRNAME=`grep '^[ ]*lxc.network.link' /etc/lxc/default.conf | sed 's/^.*=[ ]*//'`
if [ -z "$BRNAME" ]; then
return 0
fi
for try in `seq 1 30`; do
ifconfig -a |grep "^$BRNAME" >/dev/null 2>&1
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment