if [ "${CONF_SWAPSIZE}" = "" ] ; then
# compute automatic optimal size
echo -n "computing size, "
# this seems to be the nearest to physical RAM size, lacks about 60k
KCORESIZE="`ls -l /proc/kcore | awk '{ print $5 }'`"
# make MBytes which rounded down will be exactly 1 too few, so add 1
MEMSIZE="`expr "${KCORESIZE}" / 1048576 + 1`"
# default, without config file overwriding, swap=2*RAM
CONF_SWAPSIZE="`expr "${MEMSIZE}" '*' "${SWAPFACTOR}"`"
fi