blob: 066cacc158b421da18ed64eaede92c44cce03981 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
#!/bin/sh
testsdir=$(dirname $0)
. $testsdir/conf.sh
# Check host endianness
ret=$(echo I | tr -d "[:space:]" | od -to2 | head -n1 | awk '{print $2}' | cut -c6)
if [ "$ret" = "1" ]; then
# Little endian
UUE=$testsdir/1_endian_little.img.uzip.uue
elif [ "$ret" = "0" ]; then
# Big endian
UUE=$testsdir/1_endian_big.img.uzip.uue
else
echo "Couldn't detect host endianness"
exit 2
fi
echo "1..1"
uudecode $UUE
attach_md us0 -f $(basename $UUE .uue) || exit 1
sleep 1
mount -o ro /dev/${us0}.uzip "${mntpoint}" || exit 1
#cat "${mntpoint}/etalon.txt"
diff -I '\$FreeBSD.*\$' -u $testsdir/etalon/etalon.txt "${mntpoint}/etalon.txt"
if [ $? -eq 0 ]; then
echo "ok 1"
else
echo "not ok 1"
fi
|