summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xremote/rootfs/rootfs-stage32/data/opt/openslx/scripts/systemd-setup_partitions1
1 files changed, 1 insertions, 0 deletions
diff --git a/remote/rootfs/rootfs-stage32/data/opt/openslx/scripts/systemd-setup_partitions b/remote/rootfs/rootfs-stage32/data/opt/openslx/scripts/systemd-setup_partitions
index a5c2ece7..362e8f14 100755
--- a/remote/rootfs/rootfs-stage32/data/opt/openslx/scripts/systemd-setup_partitions
+++ b/remote/rootfs/rootfs-stage32/data/opt/openslx/scripts/systemd-setup_partitions
@@ -173,6 +173,7 @@ CPUS=$(grep -c -E "^processor.*[0-9]+$" /proc/cpuinfo)
if [ -z "$CPUS" ]; then
echo "ERROR: Could not determine CPU core count"
else
+ [ "$CPUS" -gt "16" ] && CPUS=16 # zram can only handle up to 32 devices, the system can apparently even just handle 29 swap partitions, so use a reasonable upper limit
if ! modprobe zram "num_devices=$CPUS"; then
echo "ERROR: Could not load zram module"
else