Merge pull request #328030 from Wulfsta/swap-status

This commit is contained in:
Philip Taron 2024-08-13 07:05:46 -07:00 committed by GitHub
commit 04a8c1e764
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -272,7 +272,8 @@ in
truncate --size 0 "$DEVICE"
chattr +C "$DEVICE" 2>/dev/null || true
dd if=/dev/zero of="$DEVICE" bs=1M count=${toString sw.size}
echo "Creating swap file using dd and mkswap."
dd if=/dev/zero of="$DEVICE" bs=1M count=${toString sw.size} status=progress
${lib.optionalString (!sw.randomEncryption.enable) "mkswap ${sw.realDevice}"}
fi
''}