mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-08-16 07:05:14 +00:00
rootfs: install systemd tmp.mount if needed
On some distros (Debian, Ubuntu, openSUSE), tmp.mount is not installed by default in /[etc|usr/lib]/systemd/system, but just in /usr/shared/systemd, so it needs to be manually copied there to have /tmp mounted as tmpfs. Fixes: #317 Signed-off-by: Marco Vedovati <mvedovati@suse.com>
This commit is contained in:
parent
d9782606bb
commit
6969c7fc18
@ -385,6 +385,15 @@ fi
|
||||
info "Create symlink to /tmp in /var to create private temporal directories with systemd"
|
||||
rm -rf ./var/tmp
|
||||
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
|
||||
|
||||
[ -n "${KERNEL_MODULES_DIR}" ] && copy_kernel_modules ${KERNEL_MODULES_DIR} ${ROOTFS_DIR}
|
||||
|
Loading…
Reference in New Issue
Block a user