summaryrefslogtreecommitdiffstats
path: root/remote/rootfs/rootfs-stage32
diff options
context:
space:
mode:
authorSimon Rettberg2015-09-15 16:59:53 +0200
committerSimon Rettberg2015-09-15 16:59:53 +0200
commit3929694bcd7dac3cb56319e22b40acf748921a7c (patch)
treef5d5ded4466bae1659aa7363dd57359fa1c99913 /remote/rootfs/rootfs-stage32
parent[vmware] Downgrade hw version on new path if vmx is too new (diff)
downloadtm-scripts-3929694bcd7dac3cb56319e22b40acf748921a7c.tar.gz
tm-scripts-3929694bcd7dac3cb56319e22b40acf748921a7c.tar.xz
tm-scripts-3929694bcd7dac3cb56319e22b40acf748921a7c.zip
[rfs-stage32] Only complain about missing swap if host has less than 3gb of ram
Diffstat (limited to 'remote/rootfs/rootfs-stage32')
-rwxr-xr-xremote/rootfs/rootfs-stage32/data/opt/openslx/scripts/systemd-setup_partitions5
1 files changed, 4 insertions, 1 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 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