Support initramfs removal for all installed kernels
This commit is contained in:
parent
64eb9bf559
commit
dfa2e1cb13
@ -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
|
||||||
|
@ -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
|
||||||
|
@ -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
|
||||||
|
@ -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
|
||||||
|
@ -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
|
||||||
|
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user