Add support for kernel-genkernel-* files.
This commit is contained in:
parent
7d32bfb6a4
commit
8ca753a24f
|
@ -24,7 +24,7 @@ cd /lib/modules && $NICE_CMD rm -rf `ls | grep -v "^$REVISION$"`
|
|||
|
||||
# rm old kernel revisions
|
||||
mount -o remount,rw /boot
|
||||
cd /boot && rm -f `ls System.map-* config-* vmlinuz-* initramfs-* 2>/dev/null | grep -vE "$REVISION$|$REVISION.img$"`
|
||||
cd /boot && rm -f `ls System.map-* config-* vmlinuz-* kernel-genkernel-* initramfs-* 2>/dev/null | grep -vE "$REVISION$|$REVISION.img$"`
|
||||
mount -o remount,ro -force /boot
|
||||
|
||||
# rm old sources
|
||||
|
|
|
@ -54,7 +54,10 @@ kernel-clean.sh
|
|||
vmlinuz_file=/boot/`echo $new_kernel | sed 's~^linux~vmlinuz~'`
|
||||
[ "" == "$vmlinuz_file" ] && echo "vmlinuz_file == \"\"" && exit -1
|
||||
|
||||
if [[ ! -f "$vmlinuz_file" || 1 -eq $FORCE_REBUILD ]]; then
|
||||
genkernel_file=/boot/`echo $new_kernel | sed 's~^linux~kernel-genkernel~'`
|
||||
[ "" == "$genkernel_file" ] && echo "genkernel_file == \"\"" && exit -1
|
||||
|
||||
if [[ ! -f "$vmlinuz_file" && ! -f "$genkernel_file" || 1 -eq $FORCE_REBUILD ]]; then
|
||||
kernel-rebuild.sh $KERNEL_REBUILD_ARGS
|
||||
[ 0 -ne $? ] && echo "kernel-rebuild.sh $KERNEL_REBUILD_ARGS failed" && exit -1
|
||||
fi
|
||||
|
|
|
@ -100,6 +100,8 @@ fi
|
|||
|
||||
[ -f /boot/grub/grub.conf ] && \
|
||||
sed -i "s~\/boot\/vmlinuz-[0-9][^ ]*~\/boot\/vmlinuz-$REVISION~g;
|
||||
s~\/boot\/kernel-genkernel-x86_64-[0-9][^]*~\/boot\/kernel-genkernel-x86_64-$REVISION~g;
|
||||
s~\/boot\/kernel-genkernel-x86-[0-9][^]*~\/boot\/kernel-genkernel-x86-$REVISION~g;
|
||||
s~\/boot\/initramfs-[0-9][^ ]*~\/boot\/initramfs-$REVISION.img~g" \
|
||||
/boot/grub/grub.conf
|
||||
|
||||
|
|
Loading…
Reference in New Issue