From: Michael Prokop Date: Fri, 13 Apr 2007 09:46:42 +0000 (+0200) Subject: branch merge X-Git-Tag: 0.0.1~80 X-Git-Url: http://git.grml.org/?p=grml-live.git;a=commitdiff_plain;h=098457244f08fa0ee9d6aac13f4749a2335c9572;hp=870edc858247330fb2d0d09056334572f343627e branch merge --- diff --git a/rewrite/linuxrc b/rewrite/linuxrc index 51a31d5..cd0b251 100644 --- a/rewrite/linuxrc +++ b/rewrite/linuxrc @@ -240,6 +240,27 @@ if [ -n "$DEBUG" ]; then cat /proc/cmdline fi +# check for available ram +RAM=$(/static/awk '/MemTotal/{print $2}' /proc/meminfo) +log_begin_msg "${RAM} kB of RAM available" + +case "$CMDLINE" in *small*) GRML_TYPE="small"; ;; esac + +if [ "$GRML_TYPE" = "small" ] +then + if [[ $RAM -lt 25000 ]] + then + log_end_msg "You need at least 32MB of RAM available for grml-small" + return 1 + fi +else + if [[ $RAM -lt 58000 ]] + then + log_end_msg "You need at least 64Mb of RAM available for grml" + return 1 + fi +fi + # Run a shell if in debug mode # echo "${BLUE}Dropping you to a busybox shell for debugging.${NORMAL}" stage=1