> have a look at this.
>
> http://razius.com/articles/launching-services-after-vagrant-mount/
>
> I think you can use that trick
>
> mount -o remount,some,other,options /path
Thanks! This approach, slightly modified, did the trick.
My script in /etc/init ended up looking like this:
description "mount the 'src' synced folder again as the correct user"
author "JK Laiho"
start on vagrant-mounted
env USER=django
pre-start script
# If the user doesn't exist, don't attempt to (u)mount yet.
id -u $USER
if [ $? -ne 0 ]
then exit $?
fi
end script
script
umount /vagrant_src
mount -t vboxsf -o uid=`id -u $USER`,gid=`id -g $USER` vagrant_src
/vagrant_src
end script
Doing a mount -o remount left a duplicate entry with the old uid/gid for
this mount inside mtab for some reason, so I went with umount and mount
separated. Works fine this way, so it's not a big deal.
--
You received this message because you are subscribed to the Google Groups
"Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.