diff --git a/plugins/guests/alt/cap/change_host_name.rb b/plugins/guests/alt/cap/change_host_name.rb index 3d0333a37..a2c7b8453 100644 --- a/plugins/guests/alt/cap/change_host_name.rb +++ b/plugins/guests/alt/cap/change_host_name.rb @@ -35,6 +35,8 @@ module VagrantPlugins sed -i -e "s/\(\s\)$CURRENT_HOSTNAME_SHORT\(\s\)/\1$NEW_HOSTNAME_SHORT\2/g" -e "s/\(\s\)$CURRENT_HOSTNAME_SHORT$/\1$NEW_HOSTNAME_SHORT/g" /etc/hosts fi + # Restart network + service network restart EOH end end diff --git a/plugins/guests/alt/cap/flavor.rb b/plugins/guests/alt/cap/flavor.rb index a9b1ae017..77723f860 100644 --- a/plugins/guests/alt/cap/flavor.rb +++ b/plugins/guests/alt/cap/flavor.rb @@ -5,6 +5,17 @@ module VagrantPlugins def self.flavor(machine) # Read the version file if !comm.test("test -f /etc/os-release") + name = nil + machine.communicate.sudo("grep NAME /etc/os-release") do |type, data| + if type == :stdout + name = data.split("=")[1].chomp.to_i + end + end + + if name.nil? and name == "Sisyphus" + return :alt + end + version = nil machine.communicate.sudo("grep VERSION_ID /etc/os-release") do |type, data| if type == :stdout @@ -24,7 +35,9 @@ module VagrantPlugins end # Detect various flavors we care about - if output =~ /(ALT Workstation K|ALT Linux starter kit)\s*8( .+)?/i + if output =~ /(ALT SP|ALT Workstation|ALT Workstation K|ALT Linux starter kit)\s*8( .+)?/i + return :alt_8 + elsif output =~ /ALT\s*8( .+)?\s.+/i return :alt_8 else return :alt