lib/vagrant/util/guest_inspection.rb in vagrant-unbundled-2.2.2.0 vs lib/vagrant/util/guest_inspection.rb in vagrant-unbundled-2.2.3.0
- old
+ new
@@ -34,11 +34,15 @@
# systemd hostname set is via hostnamectl
#
# @param [Vagrant::Plugin::V2::Communicator] comm Guest communicator
# @return [Boolean]
+ # NOTE: This test includes actually calling `hostnamectl` to verify
+ # that it is in working order. This prevents attempts to use the
+ # hostnamectl command when it is available, but dbus is not which
+ # renders the command useless
def hostnamectl?(comm)
- comm.test("command -v hostnamectl")
+ comm.test("command -v hostnamectl && hostnamectl")
end
## netplan helpers
# netplan is installed