[rancid] Need Help
Brian Candler
b.candler at pobox.com
Thu Dec 17 10:14:56 UTC 2015
On 17/12/2015 10:10, Brian Candler wrote:
> cd /path/to/rancid/source/code
> grep -R SENDMAIL .
>
Actually:
grep -R MAILHEADERS .
works better for me (looks like rancid 2.3.6 doesn't have a SENDMAIL
setting). This will get you to the following bit of code:
# Mail out the diffs (if there are any).
if [ -s $TMP.diff ] ; then
(
echo "To: $mailrcpt"
echo "Subject: $subject"
echo "$MAILHEADERS" | awk '{L = "";LN = $0;while (LN ~ /\\n/)
{ I = index(LN,"\\n");L = L substr(LN,0,I-1) "\n";LN =
substr(LN,I+2,length(LN)-I-1);}print L LN;}'
echo ""
if which diffstat >/dev/null; then
diffstat $TMP.diff
fi
cat $TMP.diff
) | sendmail -t
fi
Regards,
Brian.
More information about the Rancid-discuss
mailing list