diff -Nru initramfs-tools-0.92bubuntu2.orig/conf/initramfs.conf initramfs-tools-0.92bubuntu2/conf/initramfs.conf --- initramfs-tools-0.92bubuntu2.orig/conf/initramfs.conf 2008-06-30 08:50:55.000000000 +0300 +++ initramfs-tools-0.92bubuntu2/conf/initramfs.conf 2008-07-09 01:09:03.000000000 +0300 @@ -26,6 +26,20 @@ BUSYBOX=y # +# COMPCACHE_SIZE: [ "x K" | "x M" | "x G" | "x %" ] +# +# Amount of RAM to use for RAM-based compressed swap space. +# +# An empty value - compcache isn't used, or added to the initramfs at all. +# An integer and K (e.g. 65536 K) - use a number of kilobytes. +# An integer and M (e.g. 256 M) - use a number of megabytes. +# An integer and G (e.g. 1 G) - use a number of gigabytes. +# An integer and % (e.g. 50 %) - use a percentage of the amount of RAM. +# + +COMPCACHE_SIZE="" + +# # NFS Section of the config. # diff -Nru initramfs-tools-0.92bubuntu2.orig/hooks/compcache initramfs-tools-0.92bubuntu2/hooks/compcache --- initramfs-tools-0.92bubuntu2.orig/hooks/compcache 1970-01-01 02:00:00.000000000 +0200 +++ initramfs-tools-0.92bubuntu2/hooks/compcache 2008-07-09 02:40:56.000000000 +0300 @@ -0,0 +1,49 @@ +#!/bin/sh +set -e + +if [ "$1" = prereqs ]; then + exit 0 +fi + +. /usr/share/initramfs-tools/hook-functions + +number= +suffix= +eval $(printf "%s" "$COMPCACHE_SIZE" | \ + sed -nre 's/^ *([1-9][0-9]*) *([%KMGT]) *$/number="\1"; suffix="\2";/p') + +if [ -z "$number" ] || [ -z "$suffix" ]; then + exit 0 +fi + +manual_add_modules compcache + +copy_exec /sbin/swapon + +mkdir -p "$DESTDIR"/etc/udev/rules.d +cat >"$DESTDIR"/etc/udev/rules.d/80-compcache.rules <"$DESTDIR"/scripts/init-top/compcache <