Merge pull request #6537 from mitchellh/sethvargo/emit_upstart
Fix upstart detection and event emit
This commit is contained in:
commit
ecf6087a90
|
@ -33,10 +33,11 @@ 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 && test 'upstart' = $(basename $(sudo readlink /proc/1/exe))")
|
machine.communicate.sudo <<-SCRIPT
|
||||||
machine.communicate.sudo(
|
if command -v /sbin/init &>/dev/null && /sbin/init --version | grep upstart &>/dev/null; then
|
||||||
"/sbin/initctl emit --no-wait vagrant-mounted MOUNTPOINT=#{expanded_guest_path}")
|
/sbin/initctl emit --no-wait vagrant-mounted MOUNTPOINT='#{expanded_guest_path}'
|
||||||
end
|
fi
|
||||||
|
SCRIPT
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -86,10 +86,11 @@ 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 && test 'upstart' = $(basename $(sudo readlink /proc/1/exe))")
|
machine.communicate.sudo <<-SCRIPT
|
||||||
machine.communicate.sudo(
|
if command -v /sbin/init &>/dev/null && /sbin/init --version | grep upstart &>/dev/null; then
|
||||||
"/sbin/initctl emit --no-wait vagrant-mounted MOUNTPOINT=#{expanded_guest_path}")
|
/sbin/initctl emit --no-wait vagrant-mounted MOUNTPOINT='#{expanded_guest_path}'
|
||||||
end
|
fi
|
||||||
|
SCRIPT
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -80,10 +80,11 @@ 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 && test 'upstart' = $(basename $(sudo readlink /proc/1/exe))")
|
machine.communicate.sudo <<-SCRIPT
|
||||||
machine.communicate.sudo(
|
if command -v /sbin/init &>/dev/null && /sbin/init --version | grep upstart &>/dev/null; then
|
||||||
"/sbin/initctl emit --no-wait vagrant-mounted MOUNTPOINT=#{expanded_guest_path}")
|
/sbin/initctl emit --no-wait vagrant-mounted MOUNTPOINT='#{expanded_guest_path}'
|
||||||
end
|
fi
|
||||||
|
SCRIPT
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.unmount_virtualbox_shared_folder(machine, guestpath, options)
|
def self.unmount_virtualbox_shared_folder(machine, guestpath, options)
|
||||||
|
|
Loading…
Reference in New Issue