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

git-svn-id: http://svn.code.sf.net/p/smartmontools/code/trunk@5404 4ea69e1a-61f1-4043-bf83-b5c94c648137
This commit is contained in:
chrfranke 2022-08-06 17:15:49 +00:00
parent 476ec9db47
commit b03f1a3a02
2 changed files with 5 additions and 2 deletions

View File

@ -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

View File

@ -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