ZTS: Skip udev actions in zvol_misc when not Linux
udev is only used on Linux. Skip udev_wait and udev_cleanup when not on Linux. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: John Kennedy <john.kennedy@delphix.com> Reviewed-by: George Melikov <mail@gmelikov.ru> Signed-off-by: Ryan Moeller <ryan@iXsystems.com> Closes #10165
This commit is contained in:
parent
9a51738b60
commit
c96a32e1a3
|
@ -38,9 +38,7 @@
|
|||
function udev_wait
|
||||
{
|
||||
sleep 1
|
||||
if is_freebsd; then
|
||||
return 0
|
||||
fi
|
||||
is_linux || return 0
|
||||
udevadm trigger --action=change
|
||||
udevadm settle
|
||||
for i in {1..3}; do
|
||||
|
@ -60,7 +58,9 @@ function udev_wait
|
|||
#
|
||||
function udev_cleanup
|
||||
{
|
||||
is_linux || return 0
|
||||
log_note "Pruning broken ZVOL symlinks ..."
|
||||
|
||||
udevadm settle
|
||||
# find all dangling links and delete them
|
||||
find -L "${ZVOL_DEVDIR}" -type l -print -delete
|
||||
|
|
Loading…
Reference in New Issue