From dcc7a755c9c8dd88378e90e01911ee6a0c195a6d Mon Sep 17 00:00:00 2001 From: gpurkins Date: Wed, 21 May 2014 18:21:05 -0400 Subject: [PATCH] added conditional for temporary interfaces --- plugins/guests/solaris11/cap/configure_networks.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugins/guests/solaris11/cap/configure_networks.rb b/plugins/guests/solaris11/cap/configure_networks.rb index c9254e3cf..92e47703a 100644 --- a/plugins/guests/solaris11/cap/configure_networks.rb +++ b/plugins/guests/solaris11/cap/configure_networks.rb @@ -22,7 +22,9 @@ module VagrantPlugins machine.communicate.execute("#{su_cmd} ipadm create-addr -T static -a #{network[:ip]}/#{cidr} #{device}/v4") elsif network[:type].to_sym == :dhcp #machine.communicate.execute("#{ifconfig_cmd} dhcp start") - machine.communicate.execute("#{su_cmd} ipadm create-addr -T addrconf #{device}/v4") + if machine.communicate.test("ipadm show-if -o all | grep #{device} | tr -s ' ' | cut -d ' ' -f 6 | grep '4\|6'") + machine.communicate.execute("#{su_cmd} ipadm create-addr -T addrconf #{device}/v4") + end end end end