ZTS: Fix is_physical_device on FreeBSD

This should have been using egrep.

Reviewed-by: John Kennedy <john.kennedy@delphix.com>
Reviewed-by: George Melikov <mail@gmelikov.ru>
Reviewed-by: Kjeld Schouten <kjeld@schouten-lebbing.nl>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ryan Moeller <ryan@ixsystems.com>
Closes #9840
This commit is contained in:
Ryan Moeller 2020-01-15 12:26:26 -05:00 committed by Brian Behlendorf
parent 900010daf1
commit 83c30248ef
1 changed files with 7 additions and 8 deletions

View File

@ -98,14 +98,13 @@ function is_physical_device #device
return $?
elif is_freebsd; then
is_disk_device "$DEV_DSKDIR/$device" && \
echo $device | grep -q \
echo $device | egrep -q \
-e '^a?da[0-9]+$' \
-e '^md[0-9]+$' \
-e '^mfid[0-9]+$' \
-e '^nda[0-9]+$' \
-e '^nvd[0-9]+$' \
-e '^vtbd[0-9]+$' \
> /dev/null 2>&1
-e '^vtbd[0-9]+$'
return $?
else
echo $device | egrep "^c[0-F]+([td][0-F]+)+$" > /dev/null 2>&1