aboutsummaryrefslogtreecommitdiffstats
path: root/cmd/zed/zed.d/generic-notify.sh
diff options
context:
space:
mode:
authorнаб <[email protected]>2021-04-23 22:41:19 +0200
committerBrian Behlendorf <[email protected]>2021-04-30 15:04:33 -0700
commit8dca000040bd82cebd2c184d219836b7884ddf56 (patch)
tree52cddaf772f8c988aa5aaddf0cd816fe877e897e /cmd/zed/zed.d/generic-notify.sh
parent71def603cd984780db45cf6ca93a3f24548d4eac (diff)
zed.d/*-notify.sh: use mktemp instead of generating temp path manually
Reviewed-by: Tony Hutter <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes #11935
Diffstat (limited to 'cmd/zed/zed.d/generic-notify.sh')
-rwxr-xr-xcmd/zed/zed.d/generic-notify.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/cmd/zed/zed.d/generic-notify.sh b/cmd/zed/zed.d/generic-notify.sh
index e438031a0..1db26980c 100755
--- a/cmd/zed/zed.d/generic-notify.sh
+++ b/cmd/zed/zed.d/generic-notify.sh
@@ -31,7 +31,7 @@ umask 077
pool_str="${ZEVENT_POOL:+" for ${ZEVENT_POOL}"}"
host_str=" on $(hostname)"
note_subject="ZFS ${ZEVENT_SUBCLASS} event${pool_str}${host_str}"
-note_pathname="${TMPDIR:="/tmp"}/$(basename -- "$0").${ZEVENT_EID}.$$"
+note_pathname="$(mktemp)"
{
echo "ZFS has posted the following event:"
echo