From 4d829ad9c128d7769a1552d3170d2a66b8c6c7d4 Mon Sep 17 00:00:00 2001 From: allen-4 <65494904+allen-4@users.noreply.github.com> Date: Fri, 29 May 2020 15:01:57 -0400 Subject: [PATCH] Update zfs-functions.in The init.d zfs-share script does not perform the intended action without having a variable set for ZFS_SHARE and ZFS_UNSHARE Assign default values to ZFS_SHARE and ZFS_UNSHARE. Export the environment variables after sourcing the configuration file. Reviewed-by: Richard Yao Reviewed-by: Brian Behlendorf Reviewed-by: Georgy Yakovlev Signed-off-by: Allen Holl Closes #10341 Closes #10382 --- etc/zfs/zfs-functions.in | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/etc/zfs/zfs-functions.in b/etc/zfs/zfs-functions.in index 043f1b073..c2ce6157c 100644 --- a/etc/zfs/zfs-functions.in +++ b/etc/zfs/zfs-functions.in @@ -96,8 +96,8 @@ ZPOOL_CACHE="@sysconfdir@/zfs/zpool.cache" # Sensible defaults ZFS_MOUNT='yes' ZFS_UNMOUNT='yes' - -export ZFS ZED ZPOOL ZPOOL_CACHE ZFS_MOUNT ZFS_UNMOUNT +ZFS_SHARE='yes' +ZFS_UNSHARE='yes' # Source zfs configuration, overriding the defaults if [ -f @initconfdir@/zfs ]; then @@ -106,6 +106,8 @@ fi # ---------------------------------------------------- +export ZFS ZED ZPOOL ZPOOL_CACHE ZFS_MOUNT ZFS_UNMOUNT ZFS_SHARE ZFS_UNSHARE + zfs_action() { local MSG="$1"; shift