Merge pull request #10595 from danowar2k/master

- FIX for #10594
This commit is contained in:
Chris Roberts 2019-02-26 14:09:31 -08:00 committed by GitHub
commit 927364652f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -14,6 +14,9 @@ module VagrantPlugins
cidr = mask.split(".").map { |e| e.to_i.to_s(2).rjust(8, "0") }.join.count("1").to_s
if network[:type].to_sym == :static
unless machine.communicate.test("ipadm show-if #{device}")
machine.communicate.execute("#{su_cmd} ipadm create-ip #{device}")
end
if machine.communicate.test("ipadm | grep #{device}/v4")
machine.communicate.execute("#{su_cmd} ipadm delete-addr #{device}/v4")
end