From dfa2e1cb1303af1c6875ebca1ec56f6e6e8041e9 Mon Sep 17 00:00:00 2001 From: Silvan Calarco Date: Mon, 7 Nov 2011 01:34:59 +0100 Subject: [PATCH] Support initramfs removal for all installed kernels --- platforms/livecd-gnome-root/post.inc.sh | 11 ++++++----- platforms/livecd-light-root/post.inc.sh | 11 ++++++----- platforms/livecd-root/post.inc.sh | 11 ++++++----- platforms/livedvd-root/post.inc.sh | 4 +++- platforms/livegames-root/post.inc.sh | 8 ++++++-- platforms/testcd-root/post.inc.sh | 11 ++++++----- 6 files changed, 33 insertions(+), 23 deletions(-) diff --git a/platforms/livecd-gnome-root/post.inc.sh b/platforms/livecd-gnome-root/post.inc.sh index b8c8ca2..2634261 100644 --- a/platforms/livecd-gnome-root/post.inc.sh +++ b/platforms/livecd-gnome-root/post.inc.sh @@ -45,11 +45,12 @@ esac echo $timezone > $MOUNTDIR/etc/timezone cp $MOUNTDIR/usr/share/zoneinfo/$timezone $MOUNTDIR/etc/localtime -# remove unused initramfs generated by kernel -rm -f $MOUNTDIR/boot/initramfs-${KERNEL_MAJVER}${KERNEL_EXTRAVER}.img* - -# remove failsafe image to save space for livecd -rm -f $MOUNTDIR/boot/initramfs-${KERNEL_MAJVER}${KERNEL_EXTRAVER}-failsafe.img* +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* +done # install all GConf rules cat > $MOUNTDIR/tmp/gconftool.sh << _EOF diff --git a/platforms/livecd-light-root/post.inc.sh b/platforms/livecd-light-root/post.inc.sh index 714961c..b19c4bc 100644 --- a/platforms/livecd-light-root/post.inc.sh +++ b/platforms/livecd-light-root/post.inc.sh @@ -34,11 +34,12 @@ esac echo $timezone > $MOUNTDIR/etc/timezone cp $MOUNTDIR/usr/share/zoneinfo/$timezone $MOUNTDIR/etc/localtime -# remove unused initramfs generated by kernel -rm -f $MOUNTDIR/boot/initramfs-${KERNEL_MAJVER}${KERNEL_EXTRAVER}.img* - -# remove failsafe image to save space for livecd -rm -f $MOUNTDIR/boot/initramfs-${KERNEL_MAJVER}${KERNEL_EXTRAVER}-failsafe.img* +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* +done # remove some documentation to save space on CD for f in ChangeLog Changelog CHANGES TODO NEWS README README.txt; do diff --git a/platforms/livecd-root/post.inc.sh b/platforms/livecd-root/post.inc.sh index d218d06..8bc4b68 100644 --- a/platforms/livecd-root/post.inc.sh +++ b/platforms/livecd-root/post.inc.sh @@ -46,11 +46,12 @@ for f in /usr/share/applications/chromium-devel.desktop /opt/kde/share/applicati chroot $MOUNTDIR /opt/kde/bin/kickoffcfg --add-favorite $f done -# remove unused initramfs generated by kernel -rm -f $MOUNTDIR/boot/initramfs-${KERNEL_MAJVER}${KERNEL_EXTRAVER}.img* - -# remove failsafe image to save space for livecd -rm -f $MOUNTDIR/boot/initramfs-${KERNEL_MAJVER}${KERNEL_EXTRAVER}-failsafe.img* +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* +done # remove some documentation to save space on CD for f in ChangeLog Changelog CHANGES TODO NEWS README README.txt; do diff --git a/platforms/livedvd-root/post.inc.sh b/platforms/livedvd-root/post.inc.sh index f1716b8..aedeb39 100644 --- a/platforms/livedvd-root/post.inc.sh +++ b/platforms/livedvd-root/post.inc.sh @@ -47,9 +47,11 @@ for f in /usr/share/applications/chromium-devel.desktop \ chroot $MOUNTDIR /opt/kde/bin/kickoffcfg --add-favorite $f done -# remove unused initramfs generated by kernel 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* done prelink diff --git a/platforms/livegames-root/post.inc.sh b/platforms/livegames-root/post.inc.sh index fb2daca..f70fb97 100644 --- a/platforms/livegames-root/post.inc.sh +++ b/platforms/livegames-root/post.inc.sh @@ -46,8 +46,12 @@ for f in /usr/share/applications/chromium-devel.desktop; do chroot $MOUNTDIR /opt/kde/bin/kickoffcfg --add-favorite $f done -# remove unused initramfs generated by kernel -rm -f $MOUNTDIR/boot/initramfs-${KERNEL_MAJVER}${KERNEL_EXTRAVER}.img* +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* +done # disable compiz for games sed -i "/windowManager=compiz-custom/d" $MOUNTDIR/opt/kde/share/config/ksmserverrc diff --git a/platforms/testcd-root/post.inc.sh b/platforms/testcd-root/post.inc.sh index d218d06..8bc4b68 100644 --- a/platforms/testcd-root/post.inc.sh +++ b/platforms/testcd-root/post.inc.sh @@ -46,11 +46,12 @@ for f in /usr/share/applications/chromium-devel.desktop /opt/kde/share/applicati chroot $MOUNTDIR /opt/kde/bin/kickoffcfg --add-favorite $f done -# remove unused initramfs generated by kernel -rm -f $MOUNTDIR/boot/initramfs-${KERNEL_MAJVER}${KERNEL_EXTRAVER}.img* - -# remove failsafe image to save space for livecd -rm -f $MOUNTDIR/boot/initramfs-${KERNEL_MAJVER}${KERNEL_EXTRAVER}-failsafe.img* +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* +done # remove some documentation to save space on CD for f in ChangeLog Changelog CHANGES TODO NEWS README README.txt; do