Added test mode for zfs allow commands.

This commit is contained in:
Otho 2022-11-23 22:57:23 -05:00
parent f03bf1f547
commit d57c9d2d52
Signed by: Otho
GPG Key ID: 16C720CD3BBE21D9

View File

@ -66,14 +66,24 @@ get_latest_snapshot()
setup_aggregator() setup_aggregator()
{ {
create_datasets create_datasets
zfs allow -u ${BG_USER} send,snapshot,hold ${BG_ROOT} if [ $BG_TEST_MODE = "TRUE" ]; then
echo zfs allow -u ${BG_USER} send,snapshot,hold ${BG_ROOT}
else
zfs allow -u ${BG_USER} send,snapshot,hold ${BG_ROOT}
fi
} }
setup_mirror() setup_mirror()
{ {
zfs allow -u ${BG_USER} send,snapshot,hold ${BG_ROOT} if [ $BG_TEST_MODE = "TRUE" ]; then
zfs allow -u ${BG_USER} \ echo zfs allow -u ${BG_USER} send,snapshot,hold ${BG_ROOT}
compression,mountpoint,receive,create,mount ${BG_ROOT} echo zfs allow -u ${BG_USER} \
compression,mountpoint,receive,create,mount ${BG_ROOT}
else
zfs allow -u ${BG_USER} send,snapshot,hold ${BG_ROOT}
zfs allow -u ${BG_USER} \
compression,mountpoint,receive,create,mount ${BG_ROOT}
fi
} }
create_snapshot() create_snapshot()