-# Remove /var/lib/yum stuff.
-@FEBOOTSTRAP_RUN@ initramfs -- rm -rf /var/lib/yum
-
-# Remove some unreadable binaries which are incompatible with
-# the supermin appliance. Since these binaries can't be read
-# from the host filesystem, they generate warnings like:
-# cpio: ./usr/bin/chfn: Cannot open: Permission denied
-# These binaries are not needed for operation of the appliance.
-@FEBOOTSTRAP_RUN@ initramfs -- rm -f \
- /usr/bin/chfn \
- /usr/bin/chsh \
- /usr/libexec/pt_chown \
- /usr/sbin/groupdel \
- /usr/sbin/groupadd \
- /usr/sbin/useradd \
- /usr/sbin/tzdata-update \
- /usr/sbin/userdel \
- /usr/sbin/usermod \
- /usr/sbin/groupmod \
- /usr/sbin/groupmems \
- /sbin/unix_update \
- $(cd initramfs && echo usr/sbin/glibc_post_upgrade.*)
-
-# Kernel modules take up nearly half of the image. Only include ones
-# which are on the whitelist.
-exec 5<appliance/kmod.whitelist
-whitelist=
-while read kmod 0<&5; do
- whitelist="$whitelist -a -not -name $kmod"
-done
-exec 5<&-
-
-(cd initramfs && \
- find lib/modules/*/kernel -name '*.ko' $whitelist -a -print0 ) |
- xargs -0 febootstrap-run initramfs -- rm
-
-# Pull the kernel out into the current directory. We don't want it in
-# the initramfs image.
-cp initramfs/boot/vmlinuz* $koutput
-@FEBOOTSTRAP_RUN@ initramfs -- rm -rf boot
-
-# Minimize the image.
-@FEBOOTSTRAP_MINIMIZE@ initramfs
-
-# Add some missing configuration files.
-if [ ! -f initramfs/etc/hosts ]; then
- cat > hosts.new <<'__EOF__'
-127.0.0.1 guestfs localhost.localdomain localhost
-::1 localhost6.localdomain6 localhost6
-__EOF__
- @FEBOOTSTRAP_INSTALL@ initramfs hosts.new /etc/hosts 0644 root.root
- rm hosts.new