Comment 5 for bug 813837

Revision history for this message
Jean-Baptiste Lallement (jibel) wrote :

The problem seems to be this piece of code in ltsp-client-builder.postinst:

=====
chroot /target ltsp-update-image >$COMPRESS_LOG 2>&1 &
OLDVAL=0
while [ -z ${LOOP} ]; do
    rawval=$(tail -1 $COMPRESS_LOG |sed -e 's/^.* //')
    if [ "$(echo $rawval|grep '[0-9]\%$')" ];then
        val=$(echo $rawval|tr -d %)
        if [ "$val" -gt 95 ]; then
            db_progress SET 100
            sleep 3
            LOOP="False"
        else
            if [ "$val" -gt "${OLDVAL}" ];then
                db_progress SET $val
                OLDVAL=$val
            fi
        fi
    fi
done
=====

ltsp-update-image is started in the background but the loop to update the debconf progress bar exits when the mksquashfs progress reach 96%
So there is a possibility to exit the loop and continue the execution _before_ ltsp-update-image ends.

In the case $ARCH.img.tmp still exists when the script does the substitution in dhcpd.conf . But in the end the image is correctly renamed and there is no evidence of the failure excepted the wrong entry in dhcpd.conf