[DRE-commits] [vagrant-lxc] 03/06: tests: don't setup network is already OK

Antonio Terceiro terceiro at moszumanska.debian.org
Mon Apr 11 17:50:59 UTC 2016


This is an automated email from the git hooks/post-receive script.

terceiro pushed a commit to branch master
in repository vagrant-lxc.

commit a551b732f2c4a01b3aa6ae1eac820b3cd81c07c0
Author: Antonio Terceiro <terceiro at softwarelivre.org>
Date:   Mon Apr 11 14:25:07 2016 -0300

    tests: don't setup network is already OK
---
 debian/tests/basics | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/debian/tests/basics b/debian/tests/basics
index 2c3ae62..58e66c6 100755
--- a/debian/tests/basics
+++ b/debian/tests/basics
@@ -13,13 +13,15 @@ if [ -z "$ADTTMP" ]; then
   trap "rm -rf $ADTTMP" INT TERM EXIT
 fi
 
-echo USE_LXC_BRIDGE=true > /etc/default/lxc-net
-systemctl restart lxc-net
-cat > /etc/lxc/default.conf <<EOF
+if ! grep -q 'lxc.network.type.*veth' /etc/lxc/default.conf; then
+  echo USE_LXC_BRIDGE=true > /etc/default/lxc-net
+  systemctl restart lxc-net
+  cat > /etc/lxc/default.conf <<EOF
 lxc.network.type = veth
 lxc.network.flags = up
 lxc.network.link = lxcbr0
 EOF
+fi
 
 if ! (vagrant box list | grep $box); then
   vagrant box add --force --provider=$VAGRANT_DEFAULT_PROVIDER $box

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/vagrant-lxc.git



More information about the Pkg-ruby-extras-commits mailing list