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.
This commit is contained in:
Will Woods 2011-06-23 17:31:53 -04:00
parent 99a612fb0a
commit 35d532d119

View File

@ -54,6 +54,26 @@ remove /var/tmp /var/yp
## icons cache ## icons cache
remove /usr/share/icons/*/icon-theme.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 ## remove systemd for F15, otherwise clean it up
%if int(product.version) == 15: %if int(product.version) == 15:
remove /cgroup /var/cache /var/log remove /cgroup /var/cache /var/log