summaryrefslogtreecommitdiffstats
path: root/remote/rootfs/rootfs-stage32/data
diff options
context:
space:
mode:
authorSimon Rettberg2013-12-05 17:23:27 +0100
committerSimon Rettberg2013-12-05 17:23:27 +0100
commit321300b28909e9f50d53904a0f3f700375f9ac47 (patch)
treec486044dd0db84345b4bd55e9e653948ae8be229 /remote/rootfs/rootfs-stage32/data
parentMerge branch 'master' of dnbd3:openslx-ng/tm-scripts (diff)
downloadtm-scripts-321300b28909e9f50d53904a0f3f700375f9ac47.tar.gz
tm-scripts-321300b28909e9f50d53904a0f3f700375f9ac47.tar.xz
tm-scripts-321300b28909e9f50d53904a0f3f700375f9ac47.zip
[rfs-stage32] Fix zram swap creation for > 32 CPUs
zram can only handle 32 devices, so the script broke with 40 cpu cores
Diffstat (limited to 'remote/rootfs/rootfs-stage32/data')
-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