if [ "$1" = prereqs ]; then
. /usr/share/initramfs-tools/hook-functions
eval $(printf "%s" "$COMPCACHE_SIZE" | \
sed -nre 's/^ *([1-9][0-9]*) *([%KMGT]) *$/number="\1"; suffix="\2";/p')
if [ -z "$number" ] || [ -z "$suffix" ]; then
if have_module zram; then
elif have_module ramzswap; then
manual_add_modules ramzswap
elif have_module compcache; then
manual_add_modules compcache
copy_exec /usr/lib/initramfs-tools/bin/rzscontrol /sbin
mem_total="\$(sed -nre 's/^MemTotal:\\s*([0-9]+) kB\$/\\1/p' /proc/meminfo)"
%) kbytes="\$(($mem_total * $number / 100))" ;;
K) kbytes=$(($number)) ;;
M) kbytes=$(($number * 1024)) ;;
G) kbytes=$(($number * 1024 * 1024)) ;;
T) kbytes=$(($number * 1024 * 1024 * 1024)) ;;