Remove any created initramfs except failsafe one

This commit is contained in:
Silvan Calarco 2015-02-28 23:21:52 +01:00
parent d656ee17e0
commit 64d5dccb6b
5 changed files with 27 additions and 20 deletions

View File

@ -24,10 +24,13 @@ chroot $MOUNTDIR rpm -e VirtualBox-vboxguest dkms --noscripts
for K in $KERNEL_EXTRAVER $KERNEL_MORE_EXTRAVER; do
# remove kernel headers installed by dkms
chroot $MOUNTDIR smart remove kernel-${K}-headers -y
# remove unused initramfs generated by kernel
rm -f $MOUNTDIR/boot/initramfs-${KERNEL_MAJVER}${K}.img*
# remove failsafe image to save space for livecd
rm -f $MOUNTDIR/boot/initramfs-${KERNEL_MAJVER}${KERNEL_EXTRAVER}-failsafe.img*
done
# remove unused initramfs generated by kernel
for f in $MOUNTDIR/boot/initramfs-*.img*; do
case "$f" in
*failsafe*) continue ;;
*) rm -f $f ;;
esac
done
# install all GConf rules

View File

@ -17,10 +17,13 @@ chroot $MOUNTDIR rpm -e VirtualBox-vboxguest dkms --noscripts
for K in $KERNEL_EXTRAVER $KERNEL_MORE_EXTRAVER; do
# remove kernel headers installed by dkms
chroot $MOUNTDIR smart remove kernel-${K}-headers -y
# remove unused initramfs generated by kernel
rm -f $MOUNTDIR/boot/initramfs-${KERNEL_MAJVER}${K}.img*
# remove failsafe image to save space for livecd
rm -f $MOUNTDIR/boot/initramfs-${KERNEL_MAJVER}${KERNEL_EXTRAVER}-failsafe.img*
done
# remove unused initramfs generated by kernel
for f in $MOUNTDIR/boot/initramfs-*.img*; do
case "$f" in
*failsafe*) continue ;;
*) rm -f $f ;;
esac
done
# remove some documentation to save space on CD

View File

@ -16,10 +16,12 @@ for K in $KERNEL_EXTRAVER $KERNEL_MORE_EXTRAVER; do
# pre-create video drivers for VirtualBox
chroot $MOUNTDIR dkms install -q -m vboxguest -v ${virtualbox_ver} -k ${KERNEL_MAJVER}$K --force
chroot $MOUNTDIR dkms install -q -m vboxvideo -v ${virtualbox_ver} -k ${KERNEL_MAJVER}$K --force
# remove unused initramfs generated by kernel
rm -f $MOUNTDIR/boot/initramfs-${KERNEL_MAJVER}${K}.img*
# # remove failsafe image to save space for livecd
# rm -f $MOUNTDIR/boot/initramfs-${KERNEL_MAJVER}${KERNEL_EXTRAVER}-failsafe.img*
done
# remove unused initramfs generated by kernel
for f in $MOUNTDIR/boot/initramfs-*.img*; do
case "$f" in
*failsafe*) continue ;;
*) rm -f $f ;;
esac
done
prelink

View File

@ -6,11 +6,12 @@ for f in /usr/share/applications/chromium-devel.desktop; do
chroot $MOUNTDIR /opt/kde/bin/kickoffcfg --add-favorite $f
done
for K in $KERNEL_EXTRAVER $KERNEL_MORE_EXTRAVER; do
# remove unused initramfs generated by kernel
rm -f $MOUNTDIR/boot/initramfs-${KERNEL_MAJVER}${K}.img*
# remove failsafe image to save space for livecd
rm -f $MOUNTDIR/boot/initramfs-${KERNEL_MAJVER}${KERNEL_EXTRAVER}-failsafe.img*
# remove unused initramfs generated by kernel
for f in $MOUNTDIR/boot/initramfs-*.img*; do
case "$f" in
*failsafe*) continue ;;
*) rm -f $f ;;
esac
done
prelink

View File

@ -17,8 +17,6 @@ chroot $MOUNTDIR rpm -e VirtualBox-vboxguest dkms --noscripts
for K in $KERNEL_EXTRAVER $KERNEL_MORE_EXTRAVER; do
# remove kernel headers installed by dkms
chroot $MOUNTDIR smart remove kernel-${K}-headers -y
# remove failsafe image to save space for livecd
#rm -f $MOUNTDIR/boot/initramfs-${KERNEL_MAJVER}${KERNEL_EXTRAVER}-failsafe.img*
done
# remove unused initramfs generated by kernel
for f in $MOUNTDIR/boot/initramfs-*.img* do