summaryrefslogtreecommitdiffstats
path: root/cmd/zed/zed.d/zed.rc
diff options
context:
space:
mode:
authorChris Dunlap <[email protected]>2015-02-17 17:23:54 -0800
committerBrian Behlendorf <[email protected]>2015-04-27 12:08:01 -0700
commitaded9a6814c9f6260437bc186ad08debc5d0b6c8 (patch)
tree9ad772349943effa8953d8ec723aff8aa07320a4 /cmd/zed/zed.d/zed.rc
parent0336f3d001c76625281919bcf9e534d1976f3c36 (diff)
Cleanup ZEDLETs
This commit factors out several common ZEDLET code blocks into zed-functions.sh. This shortens the length of the scripts, thereby (hopefully) making them easier to understand and maintain. In addition, this commit revamps the coding style used by the scripts to be more consistent and (again, hopefully) maintainable. It now mostly follows the Google Shell Style Guide. I've tried to assimilate the following resources: Google Shell Style Guide https://google-styleguide.googlecode.com/svn/trunk/shell.xml Dash as /bin/sh https://wiki.ubuntu.com/DashAsBinSh Filenames and Pathnames in Shell: How to do it Correctly http://www.dwheeler.com/essays/filenames-in-shell.html Common shell script mistakes http://www.pixelbeat.org/programming/shell_script_mistakes.html Finally, this commit updates the exit codes used by the ZEDLETs to be more consistent with one another. All scripts run cleanly through ShellCheck <http://www.shellcheck.net/>. All scripts have been tested on bash and dash. Signed-off-by: Chris Dunlap <[email protected]>
Diffstat (limited to 'cmd/zed/zed.d/zed.rc')
-rw-r--r--cmd/zed/zed.d/zed.rc44
1 files changed, 35 insertions, 9 deletions
diff --git a/cmd/zed/zed.d/zed.rc b/cmd/zed/zed.d/zed.rc
index 69989f953..4c53207d7 100644
--- a/cmd/zed/zed.d/zed.rc
+++ b/cmd/zed/zed.d/zed.rc
@@ -1,34 +1,60 @@
+##
# zed.rc
+##
+##
# Absolute path to the debug output file.
+#
#ZED_DEBUG_LOG="/tmp/zed.debug.log"
+##
# Email address of the zpool administrator.
# Email will only be sent if ZED_EMAIL is defined.
+# Disabled by default; uncomment to enable.
+#
#ZED_EMAIL="root"
+##
+# Minimum number of seconds between emails for a similar event.
+#
+#ZED_EMAIL_INTERVAL_SECS=3600
+
+##
# Email verbosity.
# If set to 0, suppress email if the pool is healthy.
# If set to 1, send email regardless of pool health.
+#
#ZED_EMAIL_VERBOSE=0
-# Minimum number of seconds between emails sent for a similar event.
-#ZED_EMAIL_INTERVAL_SECS="3600"
-
+##
# Default directory for zed lock files.
+#
#ZED_LOCKDIR="/var/lock"
+##
# Default directory for zed state files.
+#
#ZED_RUNDIR="/var/run"
-# The syslog priority (eg, specified as a "facility.level" pair).
+##
+# Replace a device with a hot spare after N checksum errors are detected.
+# Disabled by default; uncomment to enable.
+#
+#ZED_SPARE_ON_CHECKSUM_ERRORS=10
+
+##
+# Replace a device with a hot spare after N I/O errors are detected.
+# Disabled by default; uncomment to enable.
+#
+#ZED_SPARE_ON_IO_ERRORS=1
+
+##
+# The syslog priority (e.g., specified as a "facility.level" pair).
+#
#ZED_SYSLOG_PRIORITY="daemon.notice"
+##
# The syslog tag for marking zed events.
+#
#ZED_SYSLOG_TAG="zed"
-# Replace a device with a hot spare after N I/O errors are detected.
-#ZED_SPARE_ON_IO_ERRORS=1
-
-# Replace a device with a hot spare after N checksum errors are detected.
-#ZED_SPARE_ON_CHECKSUM_ERRORS=10