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 <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
This commit is contained in:
allen-4 2020-05-29 15:01:57 -04:00 committed by GitHub
parent a1ba120927
commit 4d829ad9c1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 2 deletions

View File

@ -96,8 +96,8 @@ ZPOOL_CACHE="@sysconfdir@/zfs/zpool.cache"
# Sensible defaults # Sensible defaults
ZFS_MOUNT='yes' ZFS_MOUNT='yes'
ZFS_UNMOUNT='yes' ZFS_UNMOUNT='yes'
ZFS_SHARE='yes'
export ZFS ZED ZPOOL ZPOOL_CACHE ZFS_MOUNT ZFS_UNMOUNT ZFS_UNSHARE='yes'
# Source zfs configuration, overriding the defaults # Source zfs configuration, overriding the defaults
if [ -f @initconfdir@/zfs ]; then 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() zfs_action()
{ {
local MSG="$1"; shift local MSG="$1"; shift