From 2cf9201e69e4d8c4cb69d162ba31331feef6a373 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Fri, 9 Oct 2020 09:27:04 +0200 Subject: [slx-dmsetup] Don't fall back to /run/openslx for CoW-tmpfs This would mask anything already in /run/openslx. --- modules.d/slx-dmsetup/scripts/dmsetup-slx-device | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/modules.d/slx-dmsetup/scripts/dmsetup-slx-device b/modules.d/slx-dmsetup/scripts/dmsetup-slx-device index 9926951f..8ec27b44 100755 --- a/modules.d/slx-dmsetup/scripts/dmsetup-slx-device +++ b/modules.d/slx-dmsetup/scripts/dmsetup-slx-device @@ -193,11 +193,8 @@ ramdisk_fallback() { # prepare dedicated tmpfs mount point local cow_tmpfs="/run/openslx/cow" if ! mkdir -p "$cow_tmpfs"; then - cow_tmpfs="${cow_tmpfs}.$$" - if ! mkdir -p "$cow_tmpfs"; then - # ultimate fallback on regular /run/openslx - cow_tmpfs="/run/openslx" - fi + cow_tmpfs="${cow_tmpfs}.$$.$RANDOM" + mkdir -p "$cow_tmpfs" fi if ! mount -t tmpfs cow-tmpfs -o size="$(( read_only_device_sz / 2 + 100 ))k" "$cow_tmpfs"; then echo "$0: Failed to mount tmpfs in '$cow_tmpfs' of size '$(( read_only_device_sz / 2 + 100 ))KiB'." -- cgit v1.2.3-55-g7522