Convert the allowed characters '-', '.', and ':' in a ZFS pool name to _

to avoid causing errors in the shell script.

Submitted by:	William Grzybowski <william88@gmail.com>
Approved by:	kib (mentor)
MFC after:	7 days
Sponsored by:	iXsystems
This commit is contained in:
Josh Paetzel 2011-06-13 19:45:01 +00:00
parent 222ef43340
commit eb52d12531
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=223056

View File

@ -46,7 +46,7 @@ case "$daily_scrub_zfs_enable" in
esac
# determine how many days shall be between scrubs
eval _pool_threshold=\${daily_scrub_zfs_${pool}_threshold}
eval _pool_threshold=\${daily_scrub_zfs_$(echo "${pool}"|tr -s "-" "_"|tr -s "." "_"|tr -s ":" "_")_threshold}
if [ -z "${_pool_threshold}" ];then
_pool_threshold=${daily_scrub_zfs_default_threshold}
fi