Description: do not return error if libshare is missed Synopsis: # zpool import new cannot share 'new': : share(1M) failed # echo $? 1 Index: b/usr/src/lib/libzfs/common/libzfs_mount.c =================================================================== --- a/usr/src/lib/libzfs/common/libzfs_mount.c 2014-03-10 12:36:39.448020567 +0400 +++ b/usr/src/lib/libzfs/common/libzfs_mount.c 2014-03-10 12:37:52.162535429 +0400 @@ -716,11 +716,15 @@ return (0); if ((ret = zfs_init_libshare(hdl, SA_INIT_SHARE_API)) != SA_OK) { - (void) zfs_error_fmt(hdl, EZFS_SHARENFSFAILED, - dgettext(TEXT_DOMAIN, "cannot share '%s': %s"), - zfs_get_name(zhp), _sa_errorstr != NULL ? - _sa_errorstr(ret) : ""); - return (-1); + if (ret != SA_CONFIG_ERR) { + (void) zfs_error_fmt(hdl, EZFS_SHARENFSFAILED, + dgettext(TEXT_DOMAIN, "cannot share '%s': %s"), + zfs_get_name(zhp), _sa_errorstr != NULL ? + _sa_errorstr(ret) : ""); + return (-1); + } else { + return (0); + } } for (curr_proto = proto; *curr_proto != PROTO_END; curr_proto++) {