View | Details | Raw Unified | Return to bug 158551
Collapse All | Expand All

(-)800.scrub-zfs (-4 / +5 lines)
Lines 51-60 Link Here
51
			_pool_threshold=${daily_scrub_zfs_default_threshold}
51
			_pool_threshold=${daily_scrub_zfs_default_threshold}
52
		fi
52
		fi
53
53
54
		_last_scrub=$(zpool history ${pool} | \
54
        _last_successful_scrub=$(zpool history ${pool} | \
55
		    egrep "^[0-9\.\:\-]{19} zpool scrub ${pool}\$" | tail -1 |\
55
            egrep "^[0-9\.\:\-]{19} zpool scrub( -s | )${pool}\$" |  \
56
		    cut -d ' ' -f 1)
56
            awk 'BEGIN { scrub1="" }; /zpool scrub -s/{ scrub1=scrub2 }; \
57
		if [ -z "${_last_scrub}" ]; then
57
                /zpool scrub/ && ! / -s /{ scrub2=scrub1; scrub1=$1 }; END { print scrub1 }')
58
		if [ -z "${_last_successful_scrub}" ]; then
58
			# creation time of the pool if no scrub was done
59
			# creation time of the pool if no scrub was done
59
			_last_scrub=$(zpool history ${pool} | \
60
			_last_scrub=$(zpool history ${pool} | \
60
			    sed -ne '2s/ .*$//p')
61
			    sed -ne '2s/ .*$//p')

Return to bug 158551