lib/rvc/modules/vim.rb in rvc-1.4.1 vs lib/rvc/modules/vim.rb in rvc-1.5.0
- old
+ new
@@ -79,17 +79,22 @@
end
unless opts[:rev]
# negotiate API version
rev = vim.serviceContent.about.apiVersion
- vim.rev = [rev, ENV['RVC_VIMREV'] || '4.1'].min
+ vim.rev = [rev, ENV['RVC_VIMREV'] || '5.0'].min
end
isVC = vim.serviceContent.about.apiType == "VirtualCenter"
# authenticate
if username == nil
- username = isVC ? 'Administrator' : 'root'
+ if isVC
+ isLinux = vim.serviceContent.about.osType == "linux-x64"
+ username = isLinux ? 'root' : 'Administrator'
+ else
+ username = 'root'
+ end
puts "Using default username #{username.inspect}."
end
# If we already have a password, then don't bother querying if we have an OSX
# keychain entry for it. If we have either of them, use it.