diff --git a/smartmontools/ChangeLog b/smartmontools/ChangeLog index 12a0b94f189ffdd908ec8bb506ec8fe496cb240d..a0ad758e8bd81ab75e6a413755ca871ebc7916de 100644 --- a/smartmontools/ChangeLog +++ b/smartmontools/ChangeLog @@ -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 diff --git a/smartmontools/examplescripts/Example8 b/smartmontools/examplescripts/Example8 index 0a175cc8be7dbb8e32f8adcdc51ca2cd931701e7..2bf60afe7c445ef80ddf217a627c4a7f6834bb30 100755 --- a/smartmontools/examplescripts/Example8 +++ b/smartmontools/examplescripts/Example8 @@ -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