tazlito rev 508

Fix cleanup_efi_boot
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sun Jun 03 13:08:22 2018 +0200 (13 months ago)
parents 035c08dd4580
children d585f8404493
files tazlito
line diff
     1.1 --- a/tazlito	Sat Jun 02 15:45:33 2018 +0200
     1.2 +++ b/tazlito	Sun Jun 03 13:08:22 2018 +0200
     1.3 @@ -1264,12 +1264,14 @@
     1.4  cleanup_efi_boot() {
     1.5  	for i in $1/efi/boot/* ; do
     1.6  		[ -f $i ] || continue
     1.7 -		b=${i/\/efi\//\/}
     1.8 -		cmp $i ${b%.efi} || continue
     1.9 +		case "$i" in
    1.10 +		*/rootfs*)	cmp $i ${i/\/efi\//\/} || continue ;;
    1.11 +		*/bootia32.efi)	cmp $i $1/boot/bzImage || continue
    1.12 +				rm $1/efi/boot/linux.cmdline ;;
    1.13 +		*/bootx64.efi)	cmp $i $1/boot/bzImage64 || continue
    1.14 +				rm $1/efi/boot/linux.cmdline* ;;
    1.15 +		esac
    1.16  		rm -f $i
    1.17 -		case "$i" in
    1.18 -		*vmlinuz*) rm -f $(dirname $i)/linux.cmdline ;;
    1.19 -		esac
    1.20  		rmdir $1/efi/boot && rmdir $1/efi
    1.21  	done 2> /dev/null
    1.22  }