Support initramfs removal for all installed kernels

This commit is contained in:
Silvan Calarco 2011-11-07 01:34:59 +01:00
parent 64eb9bf559
commit dfa2e1cb13
6 changed files with 33 additions and 23 deletions

View File

@ -45,11 +45,12 @@ esac
echo $timezone > $MOUNTDIR/etc/timezone echo $timezone > $MOUNTDIR/etc/timezone
cp $MOUNTDIR/usr/share/zoneinfo/$timezone $MOUNTDIR/etc/localtime cp $MOUNTDIR/usr/share/zoneinfo/$timezone $MOUNTDIR/etc/localtime
for K in $KERNEL_EXTRAVER $KERNEL_MORE_EXTRAVER; do
# remove unused initramfs generated by kernel # remove unused initramfs generated by kernel
rm -f $MOUNTDIR/boot/initramfs-${KERNEL_MAJVER}${KERNEL_EXTRAVER}.img* rm -f $MOUNTDIR/boot/initramfs-${KERNEL_MAJVER}${K}.img*
# remove failsafe image to save space for livecd # remove failsafe image to save space for livecd
rm -f $MOUNTDIR/boot/initramfs-${KERNEL_MAJVER}${KERNEL_EXTRAVER}-failsafe.img* rm -f $MOUNTDIR/boot/initramfs-${KERNEL_MAJVER}${KERNEL_EXTRAVER}-failsafe.img*
done
# install all GConf rules # install all GConf rules
cat > $MOUNTDIR/tmp/gconftool.sh << _EOF cat > $MOUNTDIR/tmp/gconftool.sh << _EOF

View File

@ -34,11 +34,12 @@ esac
echo $timezone > $MOUNTDIR/etc/timezone echo $timezone > $MOUNTDIR/etc/timezone
cp $MOUNTDIR/usr/share/zoneinfo/$timezone $MOUNTDIR/etc/localtime cp $MOUNTDIR/usr/share/zoneinfo/$timezone $MOUNTDIR/etc/localtime
for K in $KERNEL_EXTRAVER $KERNEL_MORE_EXTRAVER; do
# remove unused initramfs generated by kernel # remove unused initramfs generated by kernel
rm -f $MOUNTDIR/boot/initramfs-${KERNEL_MAJVER}${KERNEL_EXTRAVER}.img* rm -f $MOUNTDIR/boot/initramfs-${KERNEL_MAJVER}${K}.img*
# remove failsafe image to save space for livecd # remove failsafe image to save space for livecd
rm -f $MOUNTDIR/boot/initramfs-${KERNEL_MAJVER}${KERNEL_EXTRAVER}-failsafe.img* rm -f $MOUNTDIR/boot/initramfs-${KERNEL_MAJVER}${KERNEL_EXTRAVER}-failsafe.img*
done
# remove some documentation to save space on CD # remove some documentation to save space on CD
for f in ChangeLog Changelog CHANGES TODO NEWS README README.txt; do for f in ChangeLog Changelog CHANGES TODO NEWS README README.txt; do

View File

@ -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 chroot $MOUNTDIR /opt/kde/bin/kickoffcfg --add-favorite $f
done done
for K in $KERNEL_EXTRAVER $KERNEL_MORE_EXTRAVER; do
# remove unused initramfs generated by kernel # remove unused initramfs generated by kernel
rm -f $MOUNTDIR/boot/initramfs-${KERNEL_MAJVER}${KERNEL_EXTRAVER}.img* rm -f $MOUNTDIR/boot/initramfs-${KERNEL_MAJVER}${K}.img*
# remove failsafe image to save space for livecd # remove failsafe image to save space for livecd
rm -f $MOUNTDIR/boot/initramfs-${KERNEL_MAJVER}${KERNEL_EXTRAVER}-failsafe.img* rm -f $MOUNTDIR/boot/initramfs-${KERNEL_MAJVER}${KERNEL_EXTRAVER}-failsafe.img*
done
# remove some documentation to save space on CD # remove some documentation to save space on CD
for f in ChangeLog Changelog CHANGES TODO NEWS README README.txt; do for f in ChangeLog Changelog CHANGES TODO NEWS README README.txt; do

View File

@ -47,9 +47,11 @@ for f in /usr/share/applications/chromium-devel.desktop \
chroot $MOUNTDIR /opt/kde/bin/kickoffcfg --add-favorite $f chroot $MOUNTDIR /opt/kde/bin/kickoffcfg --add-favorite $f
done done
# remove unused initramfs generated by kernel
for K in $KERNEL_EXTRAVER $KERNEL_MORE_EXTRAVER; do for K in $KERNEL_EXTRAVER $KERNEL_MORE_EXTRAVER; do
# remove unused initramfs generated by kernel
rm -f $MOUNTDIR/boot/initramfs-${KERNEL_MAJVER}${K}.img* 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 done
prelink prelink

View File

@ -46,8 +46,12 @@ for f in /usr/share/applications/chromium-devel.desktop; do
chroot $MOUNTDIR /opt/kde/bin/kickoffcfg --add-favorite $f chroot $MOUNTDIR /opt/kde/bin/kickoffcfg --add-favorite $f
done done
for K in $KERNEL_EXTRAVER $KERNEL_MORE_EXTRAVER; do
# remove unused initramfs generated by kernel # remove unused initramfs generated by kernel
rm -f $MOUNTDIR/boot/initramfs-${KERNEL_MAJVER}${KERNEL_EXTRAVER}.img* 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 # disable compiz for games
sed -i "/windowManager=compiz-custom/d" $MOUNTDIR/opt/kde/share/config/ksmserverrc sed -i "/windowManager=compiz-custom/d" $MOUNTDIR/opt/kde/share/config/ksmserverrc

View File

@ -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 chroot $MOUNTDIR /opt/kde/bin/kickoffcfg --add-favorite $f
done done
for K in $KERNEL_EXTRAVER $KERNEL_MORE_EXTRAVER; do
# remove unused initramfs generated by kernel # remove unused initramfs generated by kernel
rm -f $MOUNTDIR/boot/initramfs-${KERNEL_MAJVER}${KERNEL_EXTRAVER}.img* rm -f $MOUNTDIR/boot/initramfs-${KERNEL_MAJVER}${K}.img*
# remove failsafe image to save space for livecd # remove failsafe image to save space for livecd
rm -f $MOUNTDIR/boot/initramfs-${KERNEL_MAJVER}${KERNEL_EXTRAVER}-failsafe.img* rm -f $MOUNTDIR/boot/initramfs-${KERNEL_MAJVER}${KERNEL_EXTRAVER}-failsafe.img*
done
# remove some documentation to save space on CD # remove some documentation to save space on CD
for f in ChangeLog Changelog CHANGES TODO NEWS README README.txt; do for f in ChangeLog Changelog CHANGES TODO NEWS README README.txt; do