[PATCH] dracut/save-initramfs.sh: don't save /tmp
Will Woods
wwoods at redhat.com
Wed Oct 1 22:36:25 UTC 2014
When save-initramfs.sh saves a copy of initramfs, we don't need the
contents of /tmp. I mean, they're *temporary*. You shouldn't expect them
to be there later.
This is especially important when we're fetching images (squashfs.img,
updates.img, product.img, etc.) via http/ftp - they get downloaded into
/tmp by default, and we really shouldn't be saving extra copies of them
into an archive in /run.
This should save us ~275MB RAM on PXE-booted systems using http/ftp.
Resolves: rhbz#1148618
---
dracut/save-initramfs.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dracut/save-initramfs.sh b/dracut/save-initramfs.sh
index 4ebbdfe..e55291e 100755
--- a/dracut/save-initramfs.sh
+++ b/dracut/save-initramfs.sh
@@ -16,7 +16,7 @@ if [ -z "$initramfs" ]; then
gzip=$(type -P pigz || type -P gzip)
# Prune out things we don't need - modules & firmware, python, overlay file
find / -xdev | \
- grep -Ev 'lib/modules|lib/firmware|python|overlay|etc/ssl|fsck' | \
+ grep -Ev 'tmp/|lib/modules|lib/firmware|python|overlay|etc/ssl|fsck' | \
cpio -co 2>/dev/null | $gzip -c1 > $initramfs
fi
--
1.9.3
More information about the anaconda-patches
mailing list