aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Terjan <pterjan@mandriva.org>2009-11-27 16:38:56 +0000
committerPascal Terjan <pterjan@mandriva.org>2009-11-27 16:38:56 +0000
commit31c297276697d0a7d93a4fae4c99c3939da68055 (patch)
tree1f1fb30877acfbd407e1cf3e36abbd0c45a320a7
parent8999b255cc7998ba5ea687b713ce271d997ef237 (diff)
Don't create duplicate files in initrd, mine went from 18MB to 3MB with this patch
-rwxr-xr-xscripts/make-boot-splash-raw7
1 files changed, 7 insertions, 0 deletions
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