Check Upstart is running before emitting upstart events.
Fixes issue #5377. Check that Upstart is not just installed but currently actively running before attempting to emit an event after mounting shared folders. Only requires the binary be named upstart, not that it lives in /sbin.
This commit is contained in:
parent
bdb945cd1b
commit
49ff17b9b9
|
@ -33,7 +33,7 @@ module VagrantPlugins
|
|||
end
|
||||
|
||||
# Emit an upstart event if we can
|
||||
if machine.communicate.test("test -x /sbin/initctl")
|
||||
if machine.communicate.test("test -x /sbin/initctl && test 'upstart' = $(basename $(sudo readlink /proc/1/exe))")
|
||||
machine.communicate.sudo(
|
||||
"/sbin/initctl emit --no-wait vagrant-mounted MOUNTPOINT=#{expanded_guest_path}")
|
||||
end
|
||||
|
|
|
@ -82,7 +82,7 @@ module VagrantPlugins
|
|||
end
|
||||
|
||||
# Emit an upstart event if we can
|
||||
if machine.communicate.test("test -x /sbin/initctl")
|
||||
if machine.communicate.test("test -x /sbin/initctl && test 'upstart' = $(basename $(sudo readlink /proc/1/exe))")
|
||||
machine.communicate.sudo(
|
||||
"/sbin/initctl emit --no-wait vagrant-mounted MOUNTPOINT=#{expanded_guest_path}")
|
||||
end
|
||||
|
|
|
@ -80,7 +80,7 @@ module VagrantPlugins
|
|||
end
|
||||
|
||||
# Emit an upstart event if we can
|
||||
if machine.communicate.test("test -x /sbin/initctl")
|
||||
if machine.communicate.test("test -x /sbin/initctl && test 'upstart' = $(basename $(sudo readlink /proc/1/exe))")
|
||||
machine.communicate.sudo(
|
||||
"/sbin/initctl emit --no-wait vagrant-mounted MOUNTPOINT=#{expanded_guest_path}")
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue