diff --git a/elements/ironic-agent/cleanup.d/99-ramdisk-create b/elements/ironic-agent/cleanup.d/99-ramdisk-create index b0d0a0134..16229dede 100755 --- a/elements/ironic-agent/cleanup.d/99-ramdisk-create +++ b/elements/ironic-agent/cleanup.d/99-ramdisk-create @@ -20,9 +20,6 @@ echo "#disabled" > ./tmp/fstab.new sudo mv ./tmp/fstab.new ./etc/fstab sudo ln -s ./sbin/init ./ -# Remove python object files, they're not particularly useful for a ramdisk -sudo find ./usr -name "*.pyc" -or -name "*.pyo" -delete - # Note: The pci.ids, which is used by lshw, locate on Ubuntu # in /usr/share/misc. Therefore we are removing only the # ./usr/share/misc/m* (will remove the magic and magic.mgc files). @@ -32,12 +29,17 @@ sudo find . -xdev \ -path './tmp/*' -prune -o \ -path './boot/*' -prune -o \ -path './root/.cache' -prune -o \ + -path './usr/include/*' -prune -o \ -path './usr/lib/locale/*' -prune -o \ -path './usr/share/doc/*' -prune -o \ -path './usr/share/man/*' -prune -o \ -path './usr/share/info/*' -prune -o \ -path './usr/share/licenses/*' -prune -o \ -path './usr/share/misc/m*' -prune -o \ + -path './usr/src/kernels/*' -prune -o \ + -path './var/cache/*' -prune -o \ + -name '*.pyc' -prune -o \ + -name '*.pyo' -prune -o \ -print | sudo cpio -o -H newc | gzip > ${IMAGE_PATH}.initramfs select_boot_kernel_initrd $TARGET_ROOT