--- enable-swap.conf +++ foo/enable-swap.conf @@ -12,14 +12,14 @@ # But only on devices with less than 1GB of memory ramsize=$(grep MemTotal /proc/meminfo | tr -s " " | cut -d " " -f 2) echo "Ram size = $ramsize kB" - if [ $ramsize -gt 1000000 ]; then + if [ $ramsize -gt 1100000 ]; then # 256 MB compressed swap enabled, no backend device let "ramz=256 * 1024" swappart="" else # 64 MB compressed swap enabled, maybe with backend device let "ramz=64 * 1024" - swappart=`sed -n -e '/swap/s/mtd\([0-9]\).*/\1/p' /proc/mtd` || true + swappart=`sed -n -e '/var/s/mtd\([0-9]\).*/\1/p' /proc/mtd` || true fi if [ -n "$swappart" ] &&