projects
/
zfs-ubuntu
/
.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fixed typo
[zfs-ubuntu/.git]
/
zfs-scrub
diff --git
a/zfs-scrub
b/zfs-scrub
index dffe0803941b7911a0aff4dbe7861914c5279b13..939c798b4c6339e2e0523a39903b2f0e513afd55 100755
(executable)
--- a/
zfs-scrub
+++ b/
zfs-scrub
@@
-6,13
+6,15
@@
# running at any given time. This serializes the zfs
# scrub process for any pool.
# running at any given time. This serializes the zfs
# scrub process for any pool.
-exec >> /var/log/zfs/zfs-scrub.log 2>&1
+# source our configuration
+config="${0%/*}/zfs-scripts.conf"
+[ -e "${config}.dist" ] && . ${config}.dist
+[ -e "${config}" ] && . ${config}
-PATH=/usr/sbin:/sbin:/etc/bin:$PATH
+exec >> $logdir/zfs-scrub.log 2>&1
pools="$*"
maxsleeptime=360
pools="$*"
maxsleeptime=360
-mailto=root
if [ -z "$pools" ]; then
echo "-E- Usage: $0 <pools>"
if [ -z "$pools" ]; then
echo "-E- Usage: $0 <pools>"
@@
-61,7
+63,7
@@
do
zpool status $i | grep scrub: | grep "with 0 errors" > /dev/null 2>&1
if [ $? != 0 ]; then
# The scrub found errors
zpool status $i | grep scrub: | grep "with 0 errors" > /dev/null 2>&1
if [ $? != 0 ]; then
# The scrub found errors
- zpool status $i |
/usr/bin/
mailx -s "zpool scrub $i found errors" $mailto
+ zpool status $i |
$
mailx -s "zpool scrub $i found errors" $mailto
fi
done
fi
done