echo "--- this is postinst.sh ---"

if [ -n $LEGACY_BIOS_HEAD ] ; then
    echo "We have $LEGACY_BIOS_HEAD legacy bios heads to work with"
    if [ "$LEGACY_BIOS_HEAD" == "240" ] ; then
         echo "..ohoa 240 heads,.. ..patching disk manually..: "
         #FOR IBM R52 AND R51
         echo -e -n "\xf0" |dd of=/dev/sda1 bs=1 seek=26 conv=notrunc
         mkdir -p /mnt/drive
         mount -t msdos /dev/dsk1 /mnt/drive
         echo -e -n "\xf0" |dd of=/mnt/drive/\$win_nt\$.~bt/bootsect.dat bs=1 seek=26 conv=notrunc
         sleep 30
    fi
fi

echo "--- end postinst.sh ---"
