Skip to content

Commit

Permalink
Update zfs-functions.in
Browse files Browse the repository at this point in the history
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 <ryao@gentoo.org>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Georgy Yakovlev <gyakovlev@gentoo.org>
Signed-off-by: Allen Holl <allen.m.holl@gmail.com>
Closes #10341 
Closes #10382
  • Loading branch information
allen-4 authored May 29, 2020
1 parent a1ba120 commit 4d829ad
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions etc/zfs/zfs-functions.in
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 4d829ad

Please sign in to comment.