zfs/cmd/zed
Chris Dunlap aded9a6814 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 <cdunlap@llnl.gov>
2015-04-27 12:08:01 -07:00
..
zed.d Cleanup ZEDLETs 2015-04-27 12:08:01 -07:00
.gitignore Initial implementation of zed (ZFS Event Daemon) 2014-04-02 13:10:03 -07:00
Makefile.am Cleanup ZEDLETs 2015-04-27 12:08:01 -07:00
zed.c Obtain advisory lock on ZED PID file 2014-10-06 13:17:40 -07:00
zed.h Refer to ZED's scripts as ZEDLETs 2014-09-25 13:54:17 -07:00
zed_conf.c Protect against adding duplicate strings in ZED 2015-01-30 14:46:17 -08:00
zed_conf.h Obtain advisory lock on ZED PID file 2014-10-06 13:17:40 -07:00
zed_event.c Cleanup _zed_event_add_nvpair() 2015-01-30 14:46:44 -08:00
zed_event.h Initial implementation of zed (ZFS Event Daemon) 2014-04-02 13:10:03 -07:00
zed_exec.c Refer to ZED's scripts as ZEDLETs 2014-09-25 13:54:17 -07:00
zed_exec.h Refer to ZED's scripts as ZEDLETs 2014-09-25 13:54:17 -07:00
zed_file.c Remove reverse indentation from zed comments. 2014-09-22 12:17:53 -07:00
zed_file.h Replace zed_file_create_dirs() with mkdirp() 2014-04-09 13:32:54 -07:00
zed_log.c Remove reverse indentation from zed comments. 2014-09-22 12:17:53 -07:00
zed_log.h Cleanup zed logging 2014-09-02 14:18:53 -07:00
zed_strings.c Protect against adding duplicate strings in ZED 2015-01-30 14:46:17 -08:00
zed_strings.h Protect against adding duplicate strings in ZED 2015-01-30 14:46:17 -08:00