Commit b6459e85 authored by Martin Peres's avatar Martin Peres
Browse files

initscript: check if the folder we are creating already exist

This allow re-running the initscript, which can be nice.
parent a3ef8c79
......@@ -188,7 +188,7 @@ function try_to_use_cache_device {
CONTAINER_PART_DEV=""
function mount_cache_partition {
mkdir "$CONTAINER_MOUNTPOINT"
[ -d "$CONTAINER_MOUNTPOINT" ] || mkdir "$CONTAINER_MOUNTPOINT"
# Find a suitable cache partition
case $ARG_CACHE_DEVICE in
......@@ -217,7 +217,7 @@ function setup_container_runtime {
# HACK: I could not find a way to change the right parameter in podman's
# config, so make a symlink for now
[ -d "$CONTAINER_CACHE" ] || mkdir "$CONTAINER_CACHE"
ln -s "$CONTAINER_CACHE" /var/tmp
[ -f "/var/tmp" ] || ln -s "$CONTAINER_CACHE" /var/tmp
# Squash a kernel warning
echo 1 > /sys/fs/cgroup/memory/memory.use_hierarchy
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment