Commit d7c685c6 by Felix Abecassis

lxc-oci: import common.conf and userns.conf

parent 996202e7
...@@ -34,6 +34,8 @@ for bin in skopeo umoci jq; do ...@@ -34,6 +34,8 @@ for bin in skopeo umoci jq; do
fi fi
done done
LXC_TEMPLATE_CONFIG="@LXCTEMPLATECONFIG@"
# Some useful functions # Some useful functions
cleanup() { cleanup() {
if [ -d "$DOWNLOAD_TEMP" ]; then if [ -d "$DOWNLOAD_TEMP" ]; then
...@@ -233,6 +235,14 @@ while read -r line; do ...@@ -233,6 +235,14 @@ while read -r line; do
echo "lxc.environment = ${line}" >> "${LXC_CONF_FILE}" echo "lxc.environment = ${line}" >> "${LXC_CONF_FILE}"
done <<< "${environment}" done <<< "${environment}"
if [ -e "${LXC_TEMPLATE_CONFIG}/common.conf" ]; then
echo "lxc.include = ${LXC_TEMPLATE_CONFIG}/common.conf" >> "${LXC_CONF_FILE}"
fi
if [ -n "$LXC_MAPPED_UID" ] && [ "$LXC_MAPPED_UID" != "-1" ] && [ -e "${LXC_TEMPLATE_CONFIG}/userns.conf" ]; then
echo "lxc.include = ${LXC_TEMPLATE_CONFIG}/userns.conf" >> "${LXC_CONF_FILE}"
fi
echo "lxc.uts.name = ${LXC_NAME}" >> "${LXC_CONF_FILE}" echo "lxc.uts.name = ${LXC_NAME}" >> "${LXC_CONF_FILE}"
# set the hostname # set the hostname
cat <<EOF > ${LXC_ROOTFS}/etc/hostname cat <<EOF > ${LXC_ROOTFS}/etc/hostname
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment