Merge pull request #5622 from aneeshusa/fix-mounting-with-inactive-upstart
Check Upstart is running before emitting upstart events.
This commit is contained in:
commit
92e6062f8d
|
@ -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
|
||||
|
|
|
@ -86,7 +86,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