test.sh (121169) | test.sh (125578) |
---|---|
1#!/bin/sh | 1#!/bin/sh |
2# $FreeBSD: head/sbin/gbde/test.sh 121169 2003-10-17 19:52:07Z phk $ | 2# $FreeBSD: head/sbin/gbde/test.sh 125578 2004-02-07 22:58:39Z phk $ |
3 4set -e 5 6MD=99 7mdconfig -d -u $MD > /dev/null 2>&1 || true 8 9mdconfig -a -t malloc -s 1m -u $MD 10 --- 31 unchanged lines hidden (view full) --- 42mdconfig -d -u $MD 43 44mdconfig -a -t malloc -s 1m -u $MD 45if [ -f image.uu ] ; then 46 uudecode -p image.uu | bzcat > $D 47else 48 uudecode -p ${1}/image.uu | bzcat > $D 49fi | 3 4set -e 5 6MD=99 7mdconfig -d -u $MD > /dev/null 2>&1 || true 8 9mdconfig -a -t malloc -s 1m -u $MD 10 --- 31 unchanged lines hidden (view full) --- 42mdconfig -d -u $MD 43 44mdconfig -a -t malloc -s 1m -u $MD 45if [ -f image.uu ] ; then 46 uudecode -p image.uu | bzcat > $D 47else 48 uudecode -p ${1}/image.uu | bzcat > $D 49fi |
50gbde attach $D -p foo | 50 51if [ `md5 < $D` != "a4066a739338d451b919e63f9ee4a12c" ] ; then 52 echo "Failed to set up md(4) device correctly" 53 exit 2 54fi 55 56./gbde attach $D -p foo |
51fsck_ffs ${D}.bde | 57fsck_ffs ${D}.bde |
52gbde detach $D | 58./gbde detach $D |
53mdconfig -d -u $MD 54 55 56echo "***********" 57echo "Test passed" 58echo "***********" 59exit 0 | 59mdconfig -d -u $MD 60 61 62echo "***********" 63echo "Test passed" 64echo "***********" 65exit 0 |