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
|
end
|
||||||
|
|
||||||
# Emit an upstart event if we can
|
# 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(
|
machine.communicate.sudo(
|
||||||
"/sbin/initctl emit --no-wait vagrant-mounted MOUNTPOINT=#{expanded_guest_path}")
|
"/sbin/initctl emit --no-wait vagrant-mounted MOUNTPOINT=#{expanded_guest_path}")
|
||||||
end
|
end
|
||||||
|
|
|
@ -86,7 +86,7 @@ module VagrantPlugins
|
||||||
end
|
end
|
||||||
|
|
||||||
# Emit an upstart event if we can
|
# 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(
|
machine.communicate.sudo(
|
||||||
"/sbin/initctl emit --no-wait vagrant-mounted MOUNTPOINT=#{expanded_guest_path}")
|
"/sbin/initctl emit --no-wait vagrant-mounted MOUNTPOINT=#{expanded_guest_path}")
|
||||||
end
|
end
|
||||||
|
|
|
@ -80,7 +80,7 @@ module VagrantPlugins
|
||||||
end
|
end
|
||||||
|
|
||||||
# Emit an upstart event if we can
|
# 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(
|
machine.communicate.sudo(
|
||||||
"/sbin/initctl emit --no-wait vagrant-mounted MOUNTPOINT=#{expanded_guest_path}")
|
"/sbin/initctl emit --no-wait vagrant-mounted MOUNTPOINT=#{expanded_guest_path}")
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue