From 3929694bcd7dac3cb56319e22b40acf748921a7c Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Tue, 15 Sep 2015 16:59:53 +0200 Subject: [rfs-stage32] Only complain about missing swap if host has less than 3gb of ram --- .../rootfs-stage32/data/opt/openslx/scripts/systemd-setup_partitions | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'remote') 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 3c6d12a1..0c352241 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 @@ -158,7 +158,10 @@ if [ "$HAVE_TEMP" = "no" ]; then slxlog "partition-temp" "Running /tmp on tmpfs only!" "/etc/disk.partition" fi if [ "$HAVE_SWAP" = "no" ]; then - slxlog "partition-swap" "Have no (formatted) swap partition, using zram swap only!" "/etc/disk.partition" + TOTAL_RAM=$(grep ^MemTotal /proc/meminfo | awk '{print $2}') + if [ -n "$TOTAL_RAM" ] && [ "$TOTAL_RAM" -lt "3000000" ]; then + slxlog "partition-swap" "Have no (formatted) swap partition, using zram swap only!" "/etc/disk.partition" + fi fi exit 0 -- cgit v1.2.3-55-g7522