MFC r273627,r273628:
r273627: - Print out "Bail out!" in die(..) so prove terminates immediately - Handle the output from newer versions of openssl md5, similar to what pjd@ did in r248304 Sponsored by: EMC / Isilon Storage Division r273628: Move the redirection to stderr out of the cmd variable assignment Putting 2>/dev/null in cmd= escapes the redirection operation, which causes mdconfig to think it's a filename Sponsored by: EMC / Isilon Storage Division
This commit is contained in:
parent
20a08c7aa6
commit
c1b4b35c7e
@ -39,6 +39,7 @@ fi
|
||||
die()
|
||||
{
|
||||
echo "${1}" > /dev/stderr
|
||||
echo "Bail out!"
|
||||
exit 1
|
||||
}
|
||||
|
||||
@ -166,8 +167,8 @@ create_memdisk()
|
||||
if [ -n "${devname}" ]; then
|
||||
devparam="-u ${devname}"
|
||||
fi
|
||||
cmd="mdconfig -a -t swap -s ${size} ${devparam} 2>/dev/null"
|
||||
DISKNAME=`${cmd}` || die "failed: ${cmd}"
|
||||
cmd="mdconfig -a -t swap -s ${size} ${devparam}"
|
||||
DISKNAME=`$cmd 2>/dev/null` || die "failed: ${cmd}"
|
||||
if [ -n "${devname}" ]; then
|
||||
DISKNAME="${devname}"
|
||||
fi
|
||||
@ -363,7 +364,7 @@ files_destroy()
|
||||
|
||||
name_create()
|
||||
{
|
||||
echo "zfstest_`dd if=/dev/urandom bs=1k count=1 2>/dev/null | openssl md5 | cut -b -8`"
|
||||
echo "zfstest_`dd if=/dev/urandom bs=1k count=1 2>/dev/null | openssl md5 | awk '{ print $NF }'`"
|
||||
}
|
||||
|
||||
names_create()
|
||||
|
Loading…
Reference in New Issue
Block a user