...missed to replace the device variable :-)

This commit is contained in:
Jörn Schwarze 2014-10-10 22:49:45 +02:00
parent fe3a380823
commit b2a37dae99
1 changed files with 2 additions and 2 deletions

View File

@ -19,8 +19,8 @@ module VagrantPlugins
#machine.communicate.execute("#{ifconfig_cmd} up")
#machine.communicate.execute("#{su_cmd} sh -c \"echo '#{network[:ip]}' > /etc/hostname.#{device}\"")
# ipadm create-addr -T static -a local=172.16.10.15/24 net2/v4
if machine.communicate.test("ipadm | grep net1/v4")
machine.communicate.execute("#{su_cmd} ipadm delete-addr net1/v4")
if machine.communicate.test("ipadm | grep #{device}/v4")
machine.communicate.execute("#{su_cmd} ipadm delete-addr #{device}/v4")
end
machine.communicate.execute("#{su_cmd} ipadm create-addr -T static -a #{network[:ip]}/#{cidr} #{device}/v4")
elsif network[:type].to_sym == :dhcp