mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-11-17 10:01:01 +03:00
a0d065fa92
This commit adds the zed_notify_pushbullet() function and hooks it into zed_notify(), thereby integrating it with the existing "notify" ZEDLETs. This enables ZED to push notifications to your desktop computer and/or mobile device(s). It is configured with the ZED_PUSHBULLET_ACCESS_TOKEN and ZED_PUSHBULLET_CHANNEL_TAG variables in zed.rc. https://www.pushbullet.com/ The Makefile install-data-local target has been replaced with install-data-hook. With the "-local" target, there is no particular guarantee of execution order. But with the zed.rc now potentially containing sensitive information (i.e., the Pushbullet access token), the recommended permissions have changed to 0600. The "-hook" target is always executed after the main rule's work is done; thus, the chmod will always take place after the zed.rc file has been installed. https://www.gnu.org/software/automake/manual/automake.html#Extending Signed-off-by: Chris Dunlap <cdunlap@llnl.gov> |
||
---|---|---|
.. | ||
all-debug.sh | ||
all-syslog.sh | ||
checksum-notify.sh | ||
checksum-spare.sh | ||
data-notify.sh | ||
generic-notify.sh | ||
io-notify.sh | ||
io-spare.sh | ||
README | ||
resilver.finish-notify.sh | ||
scrub.finish-notify.sh | ||
zed-functions.sh | ||
zed.rc |
Shell scripts are the recommended choice for ZEDLETs that mostly call other utilities and do relatively little data manipulation. Shell scripts MUST work on both bash and dash. Shell scripts MUST run cleanly through ShellCheck: http://www.shellcheck.net/ General functions reside in "zed-functions.sh". Use them where applicable. Additional references that may be of use: Google Shell Style Guide https://google-styleguide.googlecode.com/svn/trunk/shell.xml Dash as /bin/sh https://wiki.ubuntu.com/DashAsBinSh Common shell script mistakes http://www.pixelbeat.org/programming/shell_script_mistakes.html Filenames and Pathnames in Shell: How to do it Correctly http://www.dwheeler.com/essays/filenames-in-shell.html Autoconf: Portable Shell Programming https://www.gnu.org/software/autoconf/manual/autoconf.html#Portable-Shell Please BE CONSISTENT with the existing style, check for errors, minimize dependencies where possible, try to be portable, and comment anything non-obvious. Festina lente.