[rancid] Rancid 3.1 control_rancid errors when there are diffs

Tanner Lyle namelessjoe at hotmail.com
Wed Mar 11 14:07:58 UTC 2015


I have installed rancid 3.1 and have it working on a Ubuntu install.  It works and collects diffs and shows them in the repository and i have the cvs web working, but i cannot get it to e-mail me the diffs and am getting an error in the var/logs only when there are diffs.  it errors on the control_rancid portion of it i can send mail through postfix with both the sendmail and mail command.  I installed postfix after sendmail fail as i thought it was my problem.  Below is the log of both and the control_rancid, and yes i am a newbie


rancid log when there are no changes
rancid at lyle ~/var/logs $ tail -f networking.20150311.080400 starting: Wed Mar 11 08:04:00 CDT 2015
Trying to get all of the configs.All routers sucessfully completed.
cvs diff: Diffing .cvs diff: Diffing configscvs commit: Examining .cvs commit: Examining configs
ending: Wed Mar 11 08:05:14 CDT 2015

rancid log when there are changes
rancid at lyle ~/var/logs $ tail -f networking.20150311.083546 starting: Wed Mar 11 08:35:46 CDT 2015
Trying to get all of the configs.All routers sucessfully completed.
cvs diff: Diffing .cvs diff: Diffing configscvs commit: Examining .cvs commit: Examining configs/usr/local/rancid/var/CVS/networking/configs/foundryswitch,v  <--  configs/foundryswitchnew revision: 1.11; previous revision: 1.10/usr/local/rancid/bin/control_rancid: 483: /usr/local/rancid/bin/control_rancid: no: not found
ending: Wed Mar 11 08:37:07 CDT 2015

control_rancid                  line 483 is the     ) | no -t $MAILOPTS
# Mail out the diffs (if there are any).if [ -s $TMP.diff ] ; then    MAXSZ=${MAILSPLIT:=0}    if [ $MAXSZ -ne 0 ] ; then	BLOCKSIZE=1024; export BLOCKSIZE	tmpk=`perl -e "my(@S) = stat(\"$TMP.diff\"); print int(\\$S[7] / 1024);"`	unset BLOCKSIZE	if [ $tmpk -lt $MAXSZ ] ; then	    MAXSZ=0	fi    fi    if [ $MAXSZ -eq 0 ] ; 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 ""	  cat $TMP.diff	) | no -t $MAILOPTS    else	CDIR=`pwd`	SDIR=${TMPDIR:=/tmp}/rancid.$GROUP.$$.mail	error=`mkdir $SDIR`	if [ $? -ne 0 ] ; then	    echo "Could not create $SDIR directory" >&2	    echo $error >&2	else	    cd $SDIR	    split -b${MAXSZ}k $TMP.diff	    nfiles=`ls | wc -l | sed -e 's/^ *//' |cut -d' ' -f1`	    n=0	    dt=`perl -e 'print time();'`	    for file in `ls`; do		n=`expr $n + 1`		MSGID="<$dt.RANCID$GROUP$$${nfiles}${n}@`hostname`>"		(		echo "To: $mailrcpt"		echo "Subject: $n of ${nfiles}: $subject"		echo "Message-Id: $MSGID"		if [ $n -gt 1 ] ; then		    echo "References: $LASTIDS"		fi		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 ""		cat $file		) | no -t $MAILOPTS		LASTIDS="$LASTIDS $MSGID"		if [ $n -lt $nfiles ]; then		    # this just tries to make the msgs order right in MUAs		    sleep 1		fi	    done	    cd $CDIR	    rm -rf $SDIR	fi    fifi






 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.shrubbery.net/pipermail/rancid-discuss/attachments/20150311/4018fc56/attachment.html>


More information about the Rancid-discuss mailing list