[SCM] live-initramfs branch, debian-next, updated. debian/1.199.1-1-21-ge18156b
Daniel Baumann
daniel at debian.org
Sat May 1 11:53:24 UTC 2010
The following commit has been merged in the debian-next branch:
commit e18156b16527faf6bc6d441acc43b848390199fb
Author: Daniel Baumann <daniel at debian.org>
Date: Sat May 1 13:47:42 2010 +0200
Merging casper 1.220.
diff --git a/docs/ChangeLog.casper b/docs/ChangeLog.casper
index 3bdf715..1540603 100644
--- a/docs/ChangeLog.casper
+++ b/docs/ChangeLog.casper
@@ -1,3 +1,10 @@
+casper (1.220) lucid; urgency=low
+
+ * scripts/casper: calculate memory without "head" utility, thanks to
+ Petar Bogdanovic (LP: #25496).
+
+ -- Kees Cook <kees at ubuntu.com> Fri, 19 Feb 2010 14:04:18 -0800
+
casper (1.219) lucid; urgency=low
[ Mario Limonciello ]
diff --git a/scripts/live b/scripts/live
index a16eb6a..b1b6d3e 100755
--- a/scripts/live
+++ b/scripts/live
@@ -705,7 +705,7 @@ copy_live_to ()
if [ "${copytodev}" = "ram" ]
then
# copying to ram:
- freespace=$( expr $(awk '/MemFree/{print $2}' /proc/meminfo) + $( awk '/\<Cached/{print $2}' /proc/meminfo ) )
+ freespace=$(awk '/^MemFree:/{f=$2} /^Cached:/{c=$2} END{print f+c}' /proc/meminfo)
mount_options="-o size=${size}k"
free_string="memory"
fstype="tmpfs"
@@ -1000,7 +1000,7 @@ do_snap_copy ()
todev=$(awk -v pat="$(base_path ${todir})" '$2 == pat { print $1 }' /proc/mounts)
freespace=$(df -k | awk '/'${todev}'/{print $4}')
else
- freespace=$( expr $(awk '/MemFree/{print $2}' /proc/meminfo) + $( awk '/\<Cached/{print $2}' /proc/meminfo))
+ freespace=$(awk '/^MemFree:/{f=$2} /^Cached:/{c=$2} END{print f+c}' /proc/meminfo)
fi
tomount="/mnt/tmpsnap"
--
live-initramfs
More information about the debian-live-changes
mailing list