coreos-base/oem-vagrant: strip leading '-' from path

This commit is contained in:
Alex Crawford 2015-06-11 12:48:01 -07:00
parent 17b8e08044
commit ed61fa75bb
2 changed files with 2 additions and 2 deletions

View File

@ -26,7 +26,7 @@ module VagrantPlugins
temp.close temp.close
path = "/var/tmp/hostname.yml" path = "/var/tmp/hostname.yml"
path_esc = path.gsub("/", "-") path_esc = path.gsub("/", "-")[1..-1]
comm.upload(temp.path, path) comm.upload(temp.path, path)
comm.sudo("systemctl start system-cloudinit@#{path_esc}.service") comm.sudo("systemctl start system-cloudinit@#{path_esc}.service")
end end

View File

@ -87,7 +87,7 @@ module VagrantPlugins
temp.close temp.close
path = "/var/tmp/networks.yml" path = "/var/tmp/networks.yml"
path_esc = path.gsub("/", "-") path_esc = path.gsub("/", "-")[1..-1]
comm.upload(temp.path, path) comm.upload(temp.path, path)
comm.sudo("systemctl start system-cloudinit@#{path_esc}.service") comm.sudo("systemctl start system-cloudinit@#{path_esc}.service")
end end