Fix testing if initctl exists
If /sbin/initctl was not found, the command (`false && ...`) returned non-zero exit code leading to Vagrant throwing an exception.
This commit is contained in:
parent
17b68f7d50
commit
c566465bdc
|
@ -71,10 +71,12 @@ module VagrantPlugins
|
|||
machine.communicate.sudo(chown_commands[1]) if exit_status != 0
|
||||
|
||||
# Emit an upstart event if we can
|
||||
machine.communicate.sudo("[ -x /sbin/initctl ] && " +
|
||||
if machine.communicate.test("test -x /sbin/initctl")
|
||||
machine.communicate.sudo(
|
||||
"/sbin/initctl emit --no-wait vagrant-mounted MOUNTPOINT=#{guestpath}")
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue