From 35d532d119b5671104250351a8ce6895126c9b2a Mon Sep 17 00:00:00 2001 From: Will Woods Date: Thu, 23 Jun 2011 17:31:53 -0400 Subject: [PATCH] runtime-cleanup: delete unneeded kernel modules Removing the 'module' whitelist added ~50M of kernel modules. Yuck. This commit adds a kmod blacklist, removing ~34MB of kernel modules. Yes, that's a ~16MB increase, but we're also including a whole mess of stuff that was getting left out before: missing ISDN drivers, wireless drivers, net bonding drivers, infiniband drivers, etc. --- share/runtime-cleanup.tmpl | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/share/runtime-cleanup.tmpl b/share/runtime-cleanup.tmpl index f6af7159..25816191 100644 --- a/share/runtime-cleanup.tmpl +++ b/share/runtime-cleanup.tmpl @@ -54,6 +54,26 @@ remove /var/tmp /var/yp ## icons cache remove /usr/share/icons/*/icon-theme.cache +## clean up kernel modules +<% +removekmods = """ +sound drivers/media drivers/hwmon drivers/video drivers/char +net/atm net/bluetooth net/sched net/sctp net/bridge +net/rds net/l2tp net/decnet net/netfilter net/ipv4 net/ipv6 +drivers/watchdog drivers/target drivers/rtc drivers/input/joystick +drivers/bluetooth drivers/hid drivers/edac drivers/staging +drivers/usb/serial drivers/usb/host drivers/usb/misc +fs/ocfs2 fs/nls fs/ceph fs/nfsd fs/ubifs fs/nilfs2 +arch/x86/kvm +""".split() +%> +%for kernel in kernels: + %for kmodpath in removekmods: + remove /modules/${kernel.version}/kernel/${kmodpath} + %endfor +%endfor +## FIXME: run depmod, generate module-info + ## remove systemd for F15, otherwise clean it up %if int(product.version) == 15: remove /cgroup /var/cache /var/log