diff options
-rwxr-xr-x | modules.d/slx-dmsetup/scripts/dmsetup-slx-device | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/modules.d/slx-dmsetup/scripts/dmsetup-slx-device b/modules.d/slx-dmsetup/scripts/dmsetup-slx-device index f2977b9e..c05ef05c 100755 --- a/modules.d/slx-dmsetup/scripts/dmsetup-slx-device +++ b/modules.d/slx-dmsetup/scripts/dmsetup-slx-device @@ -461,7 +461,6 @@ if [ -n "$SLX_WRITABLE_DEVICE_IDENTIFIER" ]; then fi if [ -s "$ntfs_list" ] || [[ "${#writable_devices[@]}" -gt 1 ]]; then # More than one device, and/or NTFS space, need linear - SLX_NTFSFREE="never" # Don't try to add NTFS space later tbl="/run/openslx/dmsetup-linear-id44" pos=0 grow_max_sz=9999999999 @@ -493,6 +492,10 @@ if [ -n "$SLX_WRITABLE_DEVICE_IDENTIFIER" ]; then fi done < <( ntfsfree --block-size 512 --min-size "$(( 256 * 1024 * 1024 ))" "$dev" ) done < "$ntfs_list" + # Don't try to add NTFS space again later + SLX_NTFSFREE="never" + sed -i "s/^SLX_NTFSFREE.*$/# & # disabled in stage3\nSLX_NTFSFREE='never'/" "/etc/openslx" + rm -f -- "$ntfs_list" fi # See if we need a linear target at all if ! [ -s "$tbl" ]; then |