summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Rettberg2022-05-24 14:57:48 +0200
committerSimon Rettberg2022-05-24 14:57:48 +0200
commit4b9ee1404a824dd25e5a35d1c39b0b136a1de5ce (patch)
treee0e74e1fb6da9ffdeecf8aa19b9ebf8113cce831
parentMerge DNS search list from DHCP and config server (SLX_NET_SEARCH) (diff)
downloadsystemd-init-4b9ee1404a824dd25e5a35d1c39b0b136a1de5ce.tar.gz
systemd-init-4b9ee1404a824dd25e5a35d1c39b0b136a1de5ce.tar.xz
systemd-init-4b9ee1404a824dd25e5a35d1c39b0b136a1de5ce.zip
[slx-dmsetup] Properly disable future ntfsfree stuff if already active
-rwxr-xr-xmodules.d/slx-dmsetup/scripts/dmsetup-slx-device5
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