From c369e337e4d8b0a6eee894e075cc1ebe688fbcff Mon Sep 17 00:00:00 2001 From: Eric Radman Date: Mon, 25 Sep 2017 16:47:20 -0400 Subject: [PATCH] Skip ZFS module check on OpenBSD Avoids the following error when running `salt-call` on OpenBSD: [ERROR ] Command '/usr/sbin/rcctl get zfs-fuse' failed with return code: 2 [ERROR ] output: rcctl: service zfs-fuse does not exist --- salt/modules/zfs.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/salt/modules/zfs.py b/salt/modules/zfs.py index dc42400796..fd8b291f82 100644 --- a/salt/modules/zfs.py +++ b/salt/modules/zfs.py @@ -77,6 +77,9 @@ def __virtual__(): ) == 0: return 'zfs' + if __grains__['kernel'] == 'OpenBSD': + return False + _zfs_fuse = lambda f: __salt__['service.' + f]('zfs-fuse') if _zfs_fuse('available') and (_zfs_fuse('status') or _zfs_fuse('start')): return 'zfs'