while true
do

./print_boot_nums.sh > ./boot_nums_new.txt
echo 'nand dump fuer mtd5:'
nanddump -p  /dev/mtd13 -f ./dump_mtd5_ohneoob_new.txt
echo 'nand dump fuer mtd6:'
nanddump -p  /dev/mtd13 -f ./dump_mtd6_ohneoob_new.txt

diff boot_nums_old.txt boot_nums_new.txt
status_boot_nums=$?

diff dump_mtd5_ohneoob_old.txt dump_mtd5_ohneoob_new.txt
status_mtd5=$?

diff dump_mtd6_ohneoob_old.txt dump_mtd6_ohneoob_new.txt
status_mtd6=$?

if [ "$status_boot_nums" != 0 ]
then
	exit 1
fi

if [ "$status_mtd5" != 0 ]
then
	exit 2
fi

if [ "$status_mtd6" != 0 ]
then
	exit 3
fi

done

