From 456be6709443221088ce7ad5f7c91cffe4d4774e Mon Sep 17 00:00:00 2001 From: Julio Montes Date: Mon, 22 Apr 2019 14:30:38 -0500 Subject: [PATCH] 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 --- rootfs-builder/rootfs.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/rootfs-builder/rootfs.sh b/rootfs-builder/rootfs.sh index 000ba5f98..7e8baa693 100755 --- a/rootfs-builder/rootfs.sh +++ b/rootfs-builder/rootfs.sh @@ -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}