Commit d034795e authored by chrfranke's avatar chrfranke
Browse files

examplescripts/Example8: Use 'command -v' builtin instead of 'which'.

git-svn-id: https://svn.code.sf.net/p/smartmontools/code/trunk@5404 4ea69e1a-61f1-4043-bf83-b5c94c648137
parent f864f1d0
......@@ -2,6 +2,8 @@ $Id$
2022-08-06 Christian Franke <franke@computer.org>
examplescripts/Example8: Use 'command -v' builtin instead of 'which'.
Detect accidental use of smartd_warning script in '-M exec'.
smartd.cpp: Set SMARTD_SUBJECT to empty.
smartd_warning.sh.in, os_win32/smartd_warning.cmd: Abort if
......
......@@ -13,9 +13,10 @@
test -n "$SMARTD_ADDRESS" || exit 0
# Try mail[x]
# Note: The 'command -v' builtin requires a POSIX >= 2008 conforming shell
for mailer in \
$(which mail 2>/dev/null) \
$(which mailx 2>/dev/null) \
$(command -v mail 2>/dev/null) \
$(command -v mailx 2>/dev/null) \
/usr/bin/mail \
/usr/bin/mailx
do
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment