-
Notifications
You must be signed in to change notification settings - Fork 181
Emit "vagrant-mounted" upstart event #302
Comments
The thing is that different from the VBox provider, when the container starts it already have the synced folders mounted. Dunno what's the best approach to do that here.... Any thoughts of what we can do here to support it? |
It shouldn't matter that the folder is already mounted on start actually, as long as the event is emitted at some point afterwards (this way upstart scripts could be compatible with both vagrant-lxc and the default virtualbox provider). For the record, this is the relevant code for the virtualbox provider: https://github.com/mitchellh/vagrant/blob/5530f32922a912c4c6a8b13e5d480a80ae5f051e/plugins/guests/linux/cap/mount_virtualbox_shared_folder.rb#L79 |
No worries, tagged as an enhancement |
Wait is this event emitted inside or outside the container? If inside, then something like this is possible:
That does not give you the MOUNTPOINT variable, but is that necessary? It also emits the event on more than just lxc, if you want just lxc, use this:
|
@CameronNemo With the official VirtualBox provisioner, it's emitted from outside. However, with vagrant-lxc it probably makes more sense to emit it from inside the container (the box itself could probably be updated to emit it, as you suggest). Regarding the MOUNTPOINT variable, I myself don't use it, but someone else might. |
I believe we'd follow the approach from the VBox provider and emit the event from outside, it shouldn't be hard. |
The built-in Vagrant VirtualBox provider emits this event after the synced folder is mounted. It is necessary, as services may depend on the folder being present.
The text was updated successfully, but these errors were encountered: