mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-08-17 07:27:22 +00:00
rootfs-builder: fix chrony service
Chrony service is not started because it requires a private temporal directory, these directories can't be created in read-only filesystems. Create a symlink to /tmp in /var allowing systemd to create private temporal directories. fixes #280 Signed-off-by: Julio Montes <julio.montes@intel.com>
This commit is contained in:
parent
1afb7e5685
commit
456be67094
@ -381,6 +381,10 @@ pushd "${ROOTFS_DIR}" >> /dev/null
|
||||
if [ "$PWD" != "/" ] ; then
|
||||
rm -rf ./var/cache/ ./var/lib ./var/log
|
||||
fi
|
||||
|
||||
info "Create symlink to /tmp in /var to create private temporal directories with systemd"
|
||||
rm -rf ./var/tmp
|
||||
ln -s ../tmp ./var/
|
||||
popd >> /dev/null
|
||||
|
||||
[ -n "${KERNEL_MODULES_DIR}" ] && copy_kernel_modules ${KERNEL_MODULES_DIR} ${ROOTFS_DIR}
|
||||
|
Loading…
Reference in New Issue
Block a user