summaryrefslogtreecommitdiffstats
path: root/modules.d
diff options
context:
space:
mode:
authorSimon Rettberg2020-10-09 09:27:04 +0200
committerSimon Rettberg2020-10-09 09:27:04 +0200
commit2cf9201e69e4d8c4cb69d162ba31331feef6a373 (patch)
tree6a39f7b4eef70a8aff39ef767a608032d6f0668d /modules.d
parent[slx-dmsetup] Minor cleanup (diff)
downloadsystemd-init-2cf9201e69e4d8c4cb69d162ba31331feef6a373.tar.gz
systemd-init-2cf9201e69e4d8c4cb69d162ba31331feef6a373.tar.xz
systemd-init-2cf9201e69e4d8c4cb69d162ba31331feef6a373.zip
[slx-dmsetup] Don't fall back to /run/openslx for CoW-tmpfs
This would mask anything already in /run/openslx.
Diffstat (limited to 'modules.d')
-rwxr-xr-xmodules.d/slx-dmsetup/scripts/dmsetup-slx-device7
1 files 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'."