tazlito rev 467

Add isolinux.bin & boot.cat md5sums
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sun Oct 08 11:24:18 2017 +0200 (2017-10-08)
parents a0877c63d3c7
children 0c3b05a70f51
files tazlito
line diff
     1.1 --- a/tazlito	Sat Oct 07 23:54:04 2017 +0200
     1.2 +++ b/tazlito	Sun Oct 08 11:24:18 2017 +0200
     1.3 @@ -279,9 +279,8 @@
     1.4  EOT
     1.5  
     1.6  	action 'Computing md5...'
     1.7 +	touch boot/isolinux/boot.cat
     1.8  	find * -type f ! -name md5sum ! -name 'vmlinuz-*' -exec md5sum {} \; > md5sum
     1.9 -	sed -i -e '/  boot\/isolinux\/isolinux.bin$/d' \
    1.10 -		   -e '/  boot\/isolinux\/boot.cat$/d' md5sum
    1.11  	status
    1.12  
    1.13  	cd - >/dev/null
    1.14 @@ -299,6 +298,18 @@
    1.15  		-A "tazlito $VERSION/$(genisoimage --version)" \
    1.16  		-copyright README   -P "www.slitaz.org"  -no-pad  $2
    1.17  	rm -f /tmp/cdsort$$
    1.18 +	dd if=/dev/zero bs=2k count=16 >> $1 2> /dev/null
    1.19 +
    1.20 +	mkdir /tmp/mnt$$
    1.21 +	mount -o loop,ro $1 /tmp/mnt$$
    1.22 +	for i in boot/isolinux/isolinux.bin boot/isolinux/boot.cat ; do
    1.23 +		sed -i "s|.* $i|$( cd /tmp/mnt$$ ; md5sum $i)|" $2/md5sum
    1.24 +	done
    1.25 +	dd if=$2/md5sum of=$1 conv=notrunc bs=2k \
    1.26 +	   seek=$(stat -m /tmp/mnt$$/md5sum | sed q) 2> /dev/null
    1.27 +	umount -d //tmp/mnt$$
    1.28 +	rmdir /tmp/mnt$$
    1.29 +
    1.30  	if [ -s '/etc/tazlito/info' ]; then
    1.31  		if [ $(stat -c %s /etc/tazlito/info) -lt $(( 31*1024 )) ]; then
    1.32  			action 'Storing ISO info...'