Fixed up TODO with actual working code since we don't have awk.
authorChris Gianelloni <wolf31o2@gentoo.org>
Wed, 24 May 2006 22:42:37 +0000 (22:42 +0000)
committerChris Gianelloni <wolf31o2@gentoo.org>
Wed, 24 May 2006 22:42:37 +0000 (22:42 +0000)
git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/genkernel/trunk@392 67a159dc-881f-0410-a524-ba9dfbe2cb84

generic/initrd.scripts

index 8a68e092e1859e372979b25121c22476f6963f8b..8b3dc896ed254632d821e2d9b7c72ccc0c6eb277 100644 (file)
@@ -101,7 +101,12 @@ cache_cd_contents() {
                then
                        # TODO: Check the size of the image versus the size of our tmpfs
                        # along with the amount of available RAM and increase tmpfs size
-                       # if necessary.
+                       # if necessary. (Not having awk sucks...)
+                       # z=0
+                       # for i in $(cat /proc/meminfo | grep -e ^MemFree -e ^Cached | \
+                       # cut -d: -f2 | cut -dk -f1 | sed -e "s/^\s*//") ; do
+                       # z=$(($z + $i)) ; done
+                       # echo $z
                        good_msg "Copying loop file for caching..."
                        cp -a ${NEW_ROOT}/mnt/cdrom/${LOOP} ${NEW_ROOT}/mnt/${LOOP}
                        if [ $? -ne 0 ]