MT#6711 Fix virtualbox/vagrant shared folder issue for PRO systems

I think we finally tracked down the problem to its roots (oh boy… ٩(͡๏̯͡๏)۶)):

The problem exists only for PRO systems, where we ship the
heartbeat-2 package, which still uses and provides the /usr/lib64
directory (that's what you get for running antique software
*cough*). As soon as this directory exists the
VBoxLinuxAdditions.run script of virtualbox-guest-additions-iso
detects and uses this directory as library path. It installs the
mount.vboxsf symlink using this library path.

The symlink /sbin/mount.vboxsf points to the non-existing
/usr/lib64/VBoxGuestAdditions/mount.vboxsf file instead of
pointing to
/usr/lib/x86_64-linux-gnu/VBoxGuestAdditions/mount.vboxsf.

It works for CE systems, because we don't ship the heartbeat-2
package there. Without heartbeat-2 /usr/lib64 doesn't exist and
VBoxLinuxAdditions.run does the right™ thing by detecting
and using /usr/lib/x86_64-linux-gnu instead.

If that's finally working as expected™ I'll be able to sleep much
better again… ☻
ksolomko/vlan
Michael Prokop 12 years ago
parent 9e5287f983
commit 0064071640

@ -1870,9 +1870,13 @@ vagrant_configuration() {
ln -s /opt/VBoxGuestAdditions-4.3.10/lib/VBoxGuestAdditions ${TARGET}/usr/lib/VBoxGuestAdditions
fi
if ! [ -e ${TARGET}/sbin/mount.vboxsf ] && [ -e ${TARGET}/usr/lib/x86_64-linux-gnu/VBoxGuestAdditions/mount.vboxsf ] ; then
echo "Installing mount.vboxsf symlink to work around vbox issue"
ln -s /usr/lib/x86_64-linux-gnu/VBoxGuestAdditions/mount.vboxsf ${TARGET}/sbin/mount.vboxsf
# VBoxLinuxAdditions.run chooses /usr/lib64 as soon as this directory exists, which
# is the case for our PRO systems shipping the heartbeat-2 package; then the
# symlink /sbin/mount.vboxsf points to the non-existing /usr/lib64/VBoxGuestAdditions/mount.vboxsf
# file instead of pointing to /usr/lib/x86_64-linux-gnu/VBoxGuestAdditions/mount.vboxsf
if ! chroot "$TARGET" readlink -f /sbin/mount.vboxsf ; then
echo "Installing mount.vboxsf symlink to work around /usr/lib64 issue"
ln -sf /usr/lib/x86_64-linux-gnu/VBoxGuestAdditions/mount.vboxsf ${TARGET}/sbin/mount.vboxsf
fi
# MACs are different on buildbox and on local VirtualBox

Loading…
Cancel
Save