mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-08-15 14:43:51 +00:00
Merge pull request #319 from marcov/debian-tmp.mount
rootfs: install systemd tmp.mount if needed
This commit is contained in:
commit
434418c27b
@ -385,6 +385,15 @@ fi
|
|||||||
info "Create symlink to /tmp in /var to create private temporal directories with systemd"
|
info "Create symlink to /tmp in /var to create private temporal directories with systemd"
|
||||||
rm -rf ./var/tmp
|
rm -rf ./var/tmp
|
||||||
ln -s ../tmp ./var/
|
ln -s ../tmp ./var/
|
||||||
|
|
||||||
|
# For some distros tmp.mount may not be installed by default in systemd paths
|
||||||
|
if ! [ -f "./etc/systemd/system/tmp.mount" ] && \
|
||||||
|
! [ -f "./usr/lib/systemd/system/tmp.mount" ] &&
|
||||||
|
[ "$AGENT_INIT" != "yes" ]; then
|
||||||
|
info "Install tmp.mount in ./etc/systemd/system"
|
||||||
|
cp ./usr/share/systemd/tmp.mount ./etc/systemd/system/tmp.mount
|
||||||
|
fi
|
||||||
|
|
||||||
popd >> /dev/null
|
popd >> /dev/null
|
||||||
|
|
||||||
[ -n "${KERNEL_MODULES_DIR}" ] && copy_kernel_modules ${KERNEL_MODULES_DIR} ${ROOTFS_DIR}
|
[ -n "${KERNEL_MODULES_DIR}" ] && copy_kernel_modules ${KERNEL_MODULES_DIR} ${ROOTFS_DIR}
|
||||||
|
@ -13,12 +13,12 @@
|
|||||||
#
|
#
|
||||||
# BIN_AGENT: Name of the Kata-Agent binary
|
# BIN_AGENT: Name of the Kata-Agent binary
|
||||||
#
|
#
|
||||||
# REPO_URL: URL to distribution repository ( should be configured in
|
# REPO_URL: URL to distribution repository ( should be configured in
|
||||||
# config.sh file)
|
# config.sh file)
|
||||||
#
|
#
|
||||||
# Any other configuration variable for a specific distro must be added
|
# Any other configuration variable for a specific distro must be added
|
||||||
# and documented on its own config.sh
|
# and documented on its own config.sh
|
||||||
#
|
#
|
||||||
# - Expected result
|
# - Expected result
|
||||||
#
|
#
|
||||||
# rootfs_dir populated with rootfs pkgs
|
# rootfs_dir populated with rootfs pkgs
|
||||||
@ -65,19 +65,19 @@ build_rootfs() {
|
|||||||
# This is done to maintain consistency
|
# This is done to maintain consistency
|
||||||
PACKAGES=$(echo $PACKAGES | sed -e 's/ /,/g' )
|
PACKAGES=$(echo $PACKAGES | sed -e 's/ /,/g' )
|
||||||
EXTRA_PKGS=$(echo $EXTRA_PKGS | sed -e 's/ /,/g' )
|
EXTRA_PKGS=$(echo $EXTRA_PKGS | sed -e 's/ /,/g' )
|
||||||
|
|
||||||
# extra packages are added to packages and finally passed to debootstrap
|
# extra packages are added to packages and finally passed to debootstrap
|
||||||
if [ "${EXTRA_PKGS}" = "" ]; then
|
if [ "${EXTRA_PKGS}" = "" ]; then
|
||||||
echo "no extra packages"
|
echo "no extra packages"
|
||||||
else
|
else
|
||||||
PACKAGES="${PACKAGES},${EXTRA_PKGS}"
|
PACKAGES="${PACKAGES},${EXTRA_PKGS}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
${PKG_MANAGER} --variant=minbase \
|
${PKG_MANAGER} --variant=minbase \
|
||||||
--arch=${ARCHITECTURE}\
|
--arch=${ARCHITECTURE}\
|
||||||
--include="$PACKAGES" \
|
--include="$PACKAGES" \
|
||||||
${OS_NAME} \
|
${OS_NAME} \
|
||||||
${ROOTFS_DIR}
|
${ROOTFS_DIR}
|
||||||
|
|
||||||
chroot $ROOTFS_DIR ln -s /lib/systemd/systemd /usr/lib/systemd/systemd
|
chroot $ROOTFS_DIR ln -s /lib/systemd/systemd /usr/lib/systemd/systemd
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user