svn commit: r223056 - head/etc/periodic/daily

Josh Paetzel jpaetzel at FreeBSD.org
Mon Jun 13 19:45:02 UTC 2011


Author: jpaetzel
Date: Mon Jun 13 19:45:01 2011
New Revision: 223056
URL: http://svn.freebsd.org/changeset/base/223056

Log:
  Convert the allowed characters '-', '.', and ':' in a ZFS pool name to _
  to avoid causing errors in the shell script.
  
  Submitted by:	William Grzybowski <william88 at gmail.com>
  Approved by:	kib (mentor)
  MFC after:	7 days
  Sponsored by:	iXsystems

Modified:
  head/etc/periodic/daily/800.scrub-zfs

Modified: head/etc/periodic/daily/800.scrub-zfs
==============================================================================
--- head/etc/periodic/daily/800.scrub-zfs	Mon Jun 13 19:40:09 2011	(r223055)
+++ head/etc/periodic/daily/800.scrub-zfs	Mon Jun 13 19:45:01 2011	(r223056)
@@ -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


More information about the svn-src-all mailing list