From: Scott James Remnant Date: Thu, 12 Feb 2004 19:02:28 +0000 (+0000) Subject: * config/mailnotify (func_sendmail): Look for sendmail in a X-Git-Tag: release-1-9b~162 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b3494c878b7e6b81f2439e2b85866b9846830619;p=thirdparty%2Flibtool.git * config/mailnotify (func_sendmail): Look for sendmail in a couple of common non-PATH locations as well. --- diff --git a/ChangeLog b/ChangeLog index bc28ec4c7..afaa9b242 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2004-02-12 Scott James Remnant + + * config/mailnotify (func_sendmail): Look for sendmail in a + couple of common non-PATH locations as well. + 2004-02-12 Scott James Remnant * ltmain.in: Fix typo: macro's -> macros. diff --git a/config/mailnotify b/config/mailnotify index d3221ebc6..a9b07d908 100755 --- a/config/mailnotify +++ b/config/mailnotify @@ -370,13 +370,21 @@ func_sendmail () from_name=`echo "$my_from" | sed 's, *<.*> *$,,;s,",,g'` from_addr=`echo "$my_from" | sed "$sed_mail_address"` + SENDMAIL=sendmail + for try_sendmail in sendmail /usr/lib/sendmail /usr/sbin/sendmail; do + if which $try_sendmail >/dev/null; then + SENDMAIL=$try_sendmail + break + fi + done + func_verbose "Delivering mail, please wait..." if test -n "$from_name"; then - sendmail -F "$from_name" -f "$from_addr" $my_destination < "$my_infile" + $SENDMAIL -F "$from_name" -f "$from_addr" $my_destination < "$my_infile" elif test -n "$from_addr"; then - sendmail -f "$from_addr" $my_destination < "$my_infile" + $SENDMAIL -f "$from_addr" $my_destination < "$my_infile" else - sendmail $my_destination < "$my_infile" + $SENDMAIL $my_destination < "$my_infile" fi if test $? -eq 0; then func_verbose "...succeeded."