From 0cdd4d352c2038cf168427acc786eefa87376409 Mon Sep 17 00:00:00 2001 From: Tobias Schramm Date: Mon, 22 Aug 2016 22:27:00 +0200 Subject: [PATCH] Fixes #420 (blaze it) --- scripts/lxc-template | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/scripts/lxc-template b/scripts/lxc-template index d51c923..8893144 100755 --- a/scripts/lxc-template +++ b/scripts/lxc-template @@ -96,11 +96,6 @@ if [ -z "${LXC_PATH}" ]; then exit 1 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 [ -z "${LXC_ROOTFS}" ]; then config=${LXC_PATH}/config @@ -160,11 +155,13 @@ if [ -e "${LXC_PATH}/config-network" ]; then rm ${LXC_PATH}/config-network fi -## Append the defaults -echo "" >> ${LXC_PATH}/config -echo "##############################################" >> ${LXC_PATH}/config -echo "# vagrant-lxc base box specific configuration" >> ${LXC_PATH}/config -cat ${LXC_CONFIG} >> ${LXC_PATH}/config +if [ -n "${LXC_CONFIG}" ]; then + ## Append the defaults + echo "" >> ${LXC_PATH}/config + echo "##############################################" >> ${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 echo "" >> ${LXC_PATH}/config