Ubuntu will emit a `vagrant-mounted` event. [GH-576]
There will be a MOUNTPOINT variable available with this event that will point to the shared folder that has been mounted.
This commit is contained in:
parent
cfd0e0c30f
commit
22ff1bb047
|
@ -45,6 +45,8 @@
|
||||||
folders. [GH-551]
|
folders. [GH-551]
|
||||||
- Options passed after a `--` to `vagrant ssh` are now passed directly to
|
- Options passed after a `--` to `vagrant ssh` are now passed directly to
|
||||||
`ssh`. [GH-554]
|
`ssh`. [GH-554]
|
||||||
|
- Ubuntu guests will now emit a `vagrant-mounted` upstart event after shared
|
||||||
|
folders are mounted.
|
||||||
- Removed Thor as a dependency for the command line interfaces. This resulted
|
- Removed Thor as a dependency for the command line interfaces. This resulted
|
||||||
in general speed increases across all command line commands.
|
in general speed increases across all command line commands.
|
||||||
- Linux uses `shutdown -h` instead of `halt` to hopefully more consistently
|
- Linux uses `shutdown -h` instead of `halt` to hopefully more consistently
|
||||||
|
|
|
@ -3,6 +3,14 @@ require 'vagrant/guest/debian'
|
||||||
module Vagrant
|
module Vagrant
|
||||||
module Guest
|
module Guest
|
||||||
class Ubuntu < Debian
|
class Ubuntu < Debian
|
||||||
|
def mount_shared_folder(name, guestpath, options)
|
||||||
|
# Mount it like normal
|
||||||
|
super
|
||||||
|
|
||||||
|
# Emit an upstart event if upstart is available
|
||||||
|
@vm.channel.sudo("[ -x /sbin/initctl ] && /sbin/initctl emit vagrant-mounted MOUNTPOINT=#{guestpath}")
|
||||||
|
end
|
||||||
|
|
||||||
def change_host_name(name)
|
def change_host_name(name)
|
||||||
if !vm.channel.test("sudo hostname | grep '#{name}'")
|
if !vm.channel.test("sudo hostname | grep '#{name}'")
|
||||||
vm.channel.sudo("sed -i 's/.*$/#{name}/' /etc/hostname")
|
vm.channel.sudo("sed -i 's/.*$/#{name}/' /etc/hostname")
|
||||||
|
|
Loading…
Reference in New Issue