4 # create a randome file
5 file="`mktemp "${TMPDIR:-/tmp}/tmp.XXXXXXXXXX"`" || exit 99
10 . "@builddir@/grub-core/modinfo.sh"
12 if [ x"${grub_modinfo_platform}" = xemu ]; then
13 grub_file="(host)$file"
15 grub_file="/boot/grub/file"
19 outfile1="`mktemp "${TMPDIR:-/tmp}/tmp.XXXXXXXXXX"`" || exit 99
20 @builddir@/grub-shell --files=/boot/grub/file=$file >$outfile1 <<EOF
24 outfile2="`mktemp "${TMPDIR:-/tmp}/tmp.XXXXXXXXXX"`" || exit 99
25 sha512sum $file >$outfile2
27 SHA1=`cat $outfile1 | tr -d '\n' | cut -f1 -d\ `
28 SHA2=`cat $outfile2 | cut -f1 -d\ `
30 if test "$SHA1" = "$SHA2"; then
31 rm -f ${outfile1} ${outfile2}
34 echo "GRUB sha512sum output did not match sha512sum output."
35 echo "See diff -u ${outfile1} ${outfile2}"