tazlito rev 306

tazlito: fix align_to_32bits for writeiso
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sun Feb 10 09:31:07 2013 +0100 (2013-02-10)
parents 37bba9d0be55
children 82f739bd8c06
files tazlito
line diff
     1.1 --- a/tazlito	Sat Feb 02 10:38:08 2013 +0100
     1.2 +++ b/tazlito	Sun Feb 10 09:31:07 2013 +0100
     1.3 @@ -331,7 +331,7 @@
     1.4  align_to_32bits()
     1.5  {
     1.6  	local size
     1.7 -	size=$(stat -c %s $1)
     1.8 +	size=$(stat -c %s ${1:-/dev/null})
     1.9  	[ $(($size & 3)) -ne 0 ] &&
    1.10  	dd if=/dev/zero bs=1 count=$((4 - ($size & 3))) >> $1 2> /dev/null
    1.11  }
    1.12 @@ -369,7 +369,7 @@
    1.13  		echo "Creating rootfs.gz without compression... "
    1.14  		cat /tmp/list | cpio -o -H newc > /rootfs.gz
    1.15  	fi
    1.16 -	align_to_32bits $2
    1.17 +	align_to_32bits /rootfs.gz
    1.18  	echo 1 > /tmp/rootfs
    1.19  }
    1.20