From 31c297276697d0a7d93a4fae4c99c3939da68055 Mon Sep 17 00:00:00 2001 From: Pascal Terjan Date: Fri, 27 Nov 2009 16:38:56 +0000 Subject: Don't create duplicate files in initrd, mine went from 18MB to 3MB with this patch --- scripts/make-boot-splash-raw | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/scripts/make-boot-splash-raw b/scripts/make-boot-splash-raw index 29d727a..fdd196e 100755 --- a/scripts/make-boot-splash-raw +++ b/scripts/make-boot-splash-raw @@ -23,6 +23,13 @@ if `/bin/zcat $initrd_file 2> /dev/null | /bin/cpio -t &> /dev/null`; then /usr/libexec/plymouth/plymouth-populate-initrd -t $tmp_dir/plymouth cd $tmp_dir/plymouth + + # Avoid duplicate files, adding another copy of glibc each time makes + # initrd grow fast + /bin/zcat $initrd_file 2> /dev/null | \ + cpio-filter --exclude `/bin/find . -print | sed -e 's,\./,,g' | \ + sed -e 's,^\.$,,' | tr '\n' '|'` > $tmp_dir/initrd + /bin/find . -print | sed -e 's,\./,,g' | sed -e 's,^\.$,,' | \ sort -u | cpio -o -c -L --quiet -O $tmp_dir/initrd --append 2>/dev/null fi -- cgit v1.2.1