...missed to replace the device variable :-)
This commit is contained in:
parent
fe3a380823
commit
b2a37dae99
|
@ -19,8 +19,8 @@ module VagrantPlugins
|
||||||
#machine.communicate.execute("#{ifconfig_cmd} up")
|
#machine.communicate.execute("#{ifconfig_cmd} up")
|
||||||
#machine.communicate.execute("#{su_cmd} sh -c \"echo '#{network[:ip]}' > /etc/hostname.#{device}\"")
|
#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
|
# ipadm create-addr -T static -a local=172.16.10.15/24 net2/v4
|
||||||
if machine.communicate.test("ipadm | grep net1/v4")
|
if machine.communicate.test("ipadm | grep #{device}/v4")
|
||||||
machine.communicate.execute("#{su_cmd} ipadm delete-addr net1/v4")
|
machine.communicate.execute("#{su_cmd} ipadm delete-addr #{device}/v4")
|
||||||
end
|
end
|
||||||
machine.communicate.execute("#{su_cmd} ipadm create-addr -T static -a #{network[:ip]}/#{cidr} #{device}/v4")
|
machine.communicate.execute("#{su_cmd} ipadm create-addr -T static -a #{network[:ip]}/#{cidr} #{device}/v4")
|
||||||
elsif network[:type].to_sym == :dhcp
|
elsif network[:type].to_sym == :dhcp
|
||||||
|
|
Loading…
Reference in New Issue