Merge pull request #421 from TobleMiner/lxc-template-option-fix

Fixes #420 (blaze it)
This commit is contained in:
Virgil Dupras 2017-12-11 17:21:00 -05:00 committed by GitHub
commit e4c566ebc9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -96,11 +96,6 @@ if [ -z "${LXC_PATH}" ]; then
exit 1 exit 1
fi fi
if [ -z "${LXC_CONFIG}" ]; then
echo "'config' parameter is required"
exit 1
fi
# if $LXC_ROOTFS exists here, it was passed in with --rootfs # if $LXC_ROOTFS exists here, it was passed in with --rootfs
if [ -z "${LXC_ROOTFS}" ]; then if [ -z "${LXC_ROOTFS}" ]; then
config=${LXC_PATH}/config config=${LXC_PATH}/config
@ -160,11 +155,13 @@ if [ -e "${LXC_PATH}/config-network" ]; then
rm ${LXC_PATH}/config-network rm ${LXC_PATH}/config-network
fi fi
## Append the defaults if [ -n "${LXC_CONFIG}" ]; then
echo "" >> ${LXC_PATH}/config ## Append the defaults
echo "##############################################" >> ${LXC_PATH}/config echo "" >> ${LXC_PATH}/config
echo "# vagrant-lxc base box specific configuration" >> ${LXC_PATH}/config echo "##############################################" >> ${LXC_PATH}/config
cat ${LXC_CONFIG} >> ${LXC_PATH}/config echo "# vagrant-lxc base box specific configuration" >> ${LXC_PATH}/config
cat ${LXC_CONFIG} >> ${LXC_PATH}/config
fi
# Empty section for lxc.customize calls from vagrantfile # Empty section for lxc.customize calls from vagrantfile
echo "" >> ${LXC_PATH}/config echo "" >> ${LXC_PATH}/config