BindFS requires fuse access in order to proceed with the mount. To get fuse access bindfs needs '/dev/fuse' to exist. When BindFS is used through vagrant and vagrant-bindfs plugin it tries to use modprobe to load fuse module, but this is impossible because loading of kernel modules is not possible inside lxc. Be aware that fuse kernel module must be loaded on the host machine.
37 lines
1.3 KiB
Bash
Executable file
37 lines
1.3 KiB
Bash
Executable file
#!/bin/bash
|
|
set -e
|
|
|
|
source common/ui.sh
|
|
source common/utils.sh
|
|
|
|
# Fixes some networking issues
|
|
# See https://github.com/fgrehm/vagrant-lxc/issues/91 for more info
|
|
if ! $(grep -q 'ip6-allhosts' ${ROOTFS}/etc/hosts); then
|
|
log "Adding ipv6 allhosts entry to container's /etc/hosts"
|
|
echo 'ff02::3 ip6-allhosts' >> ${ROOTFS}/etc/hosts
|
|
fi
|
|
|
|
utils.lxc.start
|
|
|
|
if [ ${DISTRIBUTION} = 'debian' ]; then
|
|
# Ensure locales are properly set, based on http://askubuntu.com/a/238063
|
|
LANG=${LANG:-en_US.UTF-8}
|
|
sed -i "s/^# ${LANG}/${LANG}/" ${ROOTFS}/etc/locale.gen
|
|
|
|
# Fixes some networking issues
|
|
# See https://github.com/fgrehm/vagrant-lxc/issues/91 for more info
|
|
sed -i -e "s/\(127.0.0.1\s\+localhost\)/\1\n127.0.1.1\t${CONTAINER}\n/g" ${ROOTFS}/etc/hosts
|
|
|
|
# Ensures that `/tmp` does not get cleared on halt
|
|
# See https://github.com/fgrehm/vagrant-lxc/issues/68 for more info
|
|
utils.lxc.attach /usr/sbin/update-rc.d -f checkroot-bootclean.sh remove
|
|
utils.lxc.attach /usr/sbin/update-rc.d -f mountall-bootclean.sh remove
|
|
utils.lxc.attach /usr/sbin/update-rc.d -f mountnfs-bootclean.sh remove
|
|
fi
|
|
|
|
utils.lxc.attach /usr/sbin/locale-gen ${LANG}
|
|
utils.lxc.attach update-locale LANG=${LANG}
|
|
|
|
# Fix to allow bindfs
|
|
utils.lxc.attach ln -s /bin/true /sbin/modprobe
|
|
utils.lxc.attach mknod -m 666 /dev/fuse c 10 229
|