[rancid] Rancid 3.1 control_rancid errors when there are diffs

Tanner - namelessjoe at hotmail.com
Wed Mar 11 14:20:02 UTC 2015


From: namelessjoe at hotmail.com
To: rancid-discuss at shrubbery.net
Date: Wed, 11 Mar 2015 14:07:58 +0000
Subject: [rancid] Rancid 3.1 control_rancid errors when there are diffs




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






 		 	   		  

_______________________________________________
Rancid-discuss mailing list
Rancid-discuss at shrubbery.net
http://www.shrubbery.net/mailman/listinfo/rancid-discuss 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.shrubbery.net/pipermail/rancid-discuss/attachments/20150311/c3cc72aa/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: control_rancid
Type: application/octet-stream
Size: 13951 bytes
Desc: not available
URL: <http://www.shrubbery.net/pipermail/rancid-discuss/attachments/20150311/c3cc72aa/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: rancid-log-changes
Type: application/octet-stream
Size: 540 bytes
Desc: not available
URL: <http://www.shrubbery.net/pipermail/rancid-discuss/attachments/20150311/c3cc72aa/attachment-0001.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: rancid-log-nochange
Type: application/octet-stream
Size: 540 bytes
Desc: not available
URL: <http://www.shrubbery.net/pipermail/rancid-discuss/attachments/20150311/c3cc72aa/attachment-0002.obj>


More information about the Rancid-discuss mailing list