mirror of
https://git.proxmox.com/git/mirror_lxc
synced 2025-08-04 05:53:37 +00:00
lxc-oci: import common.conf and userns.conf
Signed-off-by: Felix Abecassis <fabecassis@nvidia.com>
This commit is contained in:
parent
996202e74a
commit
d7c685c6be
@ -34,6 +34,8 @@ for bin in skopeo umoci jq; do
|
||||
fi
|
||||
done
|
||||
|
||||
LXC_TEMPLATE_CONFIG="@LXCTEMPLATECONFIG@"
|
||||
|
||||
# Some useful functions
|
||||
cleanup() {
|
||||
if [ -d "$DOWNLOAD_TEMP" ]; then
|
||||
@ -233,6 +235,14 @@ while read -r line; do
|
||||
echo "lxc.environment = ${line}" >> "${LXC_CONF_FILE}"
|
||||
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}"
|
||||
# set the hostname
|
||||
cat <<EOF > ${LXC_ROOTFS}/etc/hostname
|
||||
|
Loading…
Reference in New Issue
Block a user