mirror of
https://git.proxmox.com/git/mirror_zfs
synced 2025-08-05 18:16:19 +00:00

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 <cdunlap@llnl.gov>
61 lines
1.1 KiB
Plaintext
61 lines
1.1 KiB
Plaintext
##
|
|
# 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
|
|
|
|
##
|
|
# Default directory for zed lock files.
|
|
#
|
|
#ZED_LOCKDIR="/var/lock"
|
|
|
|
##
|
|
# Default directory for zed state files.
|
|
#
|
|
#ZED_RUNDIR="/var/run"
|
|
|
|
##
|
|
# 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"
|
|
|