#!/bin/sh # if [ "$1" = "prereqs" ]; then exit 0 fi quiet=n . /scripts/functions . /conf/tcos.conf . /conf/tcos-run-functions echo 0 > /tmp/less_ram # read MemTotal (in MB) have_mem=$(awk '/^MemTotal/ {print int($2/1000)}' /proc/meminfo) if [ ${have_mem} -lt ${TCOS_MIN_RAM} ]; then # we have less than TCOS_MIN_RAM # need to start in NFS mode echo 1 > /tmp/less_ram panic "The Thin Client has less memory than the minimun required to boot." fi # force boot without nfs if booting from disk FORCE_NO_NFS=$(read_cmdline_var 'nonfs' '0') if [ $FORCE_NO_NFS = 1 ]; then echo 0 > /tmp/less_ram fi # force boot nfs FORCE_NFS=$(read_cmdline_var 'forcenfs' '0') if [ $FORCE_NFS = 1 ]; then echo 1 > /tmp/less_ram fi exit 0