Mailing List Archive

Router config diffs
Hi,

In every one hour log I can see that there is a router config diffs, along
with that I need to remove a private key which is receiving through email
also.

In router config diffs email I can see that, there is nothing much it's a
just a space only changed. Help me to fix the issue
Re: Router config diffs [ In reply to ]
Please provide your device type.


On 7/12/2018 9:13 PM, nandhakumar a wrote:
> Hi, 
>
> In every one hour log I can see that there is a router config diffs,
> along with that I need to remove a private key which is receiving
> through email also.
>
> In router config diffs email I can see that, there is nothing much
> it's a just a space only changed. Help me to fix the issue
>
>
> _______________________________________________
> Rancid-discuss mailing list
> Rancid-discuss@shrubbery.net
> http://www.shrubbery.net/mailman/listinfo/rancid-discuss

--
Doug Hughes
Keystone NAP
Fairless Hills, PA
1.844.KEYBLOCK (539.2562)
Re: router config diffs [ In reply to ]
Sun, Oct 21, 2018 at 05:45:41PM -0400, Lee:
> On 10/21/18, Wayne Eisenberg <Wayne.Eisenberg@carolinasit.com> wrote:
> > Hi,
> >
> > I'm using SVN, not CVS.
> >
> > I probably didn't do a good job of explaining. I'm not getting the same diff
> > over and over. They are new versions, valid diffs. I don't see how svn could
> > get out of sync, when the crontab was inactive (everything rem'ed out) so
> > there was no activity during the upgrade. Before the upgrade, I know there
> > were router config changes taking place and I did not get an email about
> > them. Now I do. So I'm hunting for how to turn the notifications off.
>
> I'd go with changing control_rancid. Search for
>
> # Mail out the diffs (if there are any).
> if [ -s $TMP.diff ] ; then
>
> which looks like the line to change to turn notifications off. Or
> check the FAQ:
> Q. I just want to store configrurations, I do not want to receive diffs. How
> can I accomplish this?
> A. Use procmail to filter them out of your inbox.
> OR, redirect the mail aliases in your MTA's aliases file or database to a
> mailman list with no subscribers.
> OR, redirect the mail aliases to /dev/null.
> OR, set DIFFSCRIPT in rancid.conf to something that eats it's input, such
> as "dd of=/dev/null bs=16k".

Ja. or if it is a diff repeatedly of something that ought to be ignored,
share examples.

> Regards,
> Lee
> >
> > I'm also noticing a .cvsignore file in the 'configs' folder in WebSVN. Not
> > sure why that is there or if I should care. It wasn't there before the
> > upgrade.

its also used for svn

> > Thanks,
> > Wayne
> >
> >
> > -----Original Message-----
> > From: heasley [mailto:heas@shrubbery.net]
> > Sent: Friday, October 19, 2018 11:47 AM
> > To: Wayne Eisenberg <Wayne.Eisenberg@CarolinasIT.com>
> > Cc: 'rancid-discuss@shrubbery.net' <rancid-discuss@shrubbery.net>
> > Subject: Re: [rancid] router config diffs
> >
> > Fri, Oct 19, 2018 at 05:54:48AM +0000, Wayne Eisenberg:
> >> I just upgraded from 3.1 to 3.8, and all of a sudden I am getting emails
> >> every time there is a change in the config - 'router config diff' emails.
> >> I must have tweaked something in the previous version so that I wasn't
> >> getting them for every change in config, but I don't remember what. Is
> >> there a switch or conf variable that can turn it off? I just want to be
> >> notified if rancid can't contact a device.
> >>
> >
> > please see the FAQ S2 Q4. your cvs working directory is most likely out of
> > sync somehow.
> >
> >
> > ________________________________
> >
>
> _______________________________________________
> Rancid-discuss mailing list
> Rancid-discuss@shrubbery.net
> http://www.shrubbery.net/mailman/listinfo/rancid-discuss

_______________________________________________
Rancid-discuss mailing list
Rancid-discuss@shrubbery.net
http://www.shrubbery.net/mailman/listinfo/rancid-discuss
Re: router config diffs [ In reply to ]
> I'd go with changing control_rancid. Search for
>
> # Mail out the diffs (if there are any).
> if [ -s $TMP.diff ] ; then

Bingo. I found my tweak. Thanks, Lee! Instead of actually sending the email, I had just redirected it to /dev/null.

- ) | $SENDMAIL -t $MAILOPTS
+ ) > /dev/null

Maybe that could be a config choice in rancid.conf (if it were a global switch) or .cloginrc (if you wanted to turn off mail for specific devices or groups)?

Best Regards,
Wayne


-----Original Message-----
From: Lee [mailto:ler762@gmail.com]
Sent: Sunday, October 21, 2018 5:46 PM
To: Wayne Eisenberg <Wayne.Eisenberg@CarolinasIT.com>
Cc: rancid-discuss@shrubbery.net
Subject: Re: [rancid] router config diffs

On 10/21/18, Wayne Eisenberg <Wayne.Eisenberg@carolinasit.com> wrote:
> Hi,
>
> I'm using SVN, not CVS.
>
> I probably didn't do a good job of explaining. I'm not getting the
> same diff over and over. They are new versions, valid diffs. I don't
> see how svn could get out of sync, when the crontab was inactive
> (everything rem'ed out) so there was no activity during the upgrade.
> Before the upgrade, I know there were router config changes taking
> place and I did not get an email about them. Now I do. So I'm hunting for how to turn the notifications off.

I'd go with changing control_rancid. Search for

# Mail out the diffs (if there are any).
if [ -s $TMP.diff ] ; then

which looks like the line to change to turn notifications off. Or check the FAQ:
Q. I just want to store configrurations, I do not want to receive diffs. How
can I accomplish this?
A. Use procmail to filter them out of your inbox.
OR, redirect the mail aliases in your MTA's aliases file or database to a
mailman list with no subscribers.
OR, redirect the mail aliases to /dev/null.
OR, set DIFFSCRIPT in rancid.conf to something that eats it's input, such
as "dd of=/dev/null bs=16k".

Regards,
Lee
>
> I'm also noticing a .cvsignore file in the 'configs' folder in WebSVN.
> Not sure why that is there or if I should care. It wasn't there before
> the upgrade.
>
> Thanks,
> Wayne
>
>
> -----Original Message-----
> From: heasley [mailto:heas@shrubbery.net]
> Sent: Friday, October 19, 2018 11:47 AM
> To: Wayne Eisenberg <Wayne.Eisenberg@CarolinasIT.com>
> Cc: 'rancid-discuss@shrubbery.net' <rancid-discuss@shrubbery.net>
> Subject: Re: [rancid] router config diffs
>
> Fri, Oct 19, 2018 at 05:54:48AM +0000, Wayne Eisenberg:
>> I just upgraded from 3.1 to 3.8, and all of a sudden I am getting
>> emails every time there is a change in the config - 'router config diff' emails.
>> I must have tweaked something in the previous version so that I
>> wasn't getting them for every change in config, but I don't remember
>> what. Is there a switch or conf variable that can turn it off? I just
>> want to be notified if rancid can't contact a device.
>>
>
> please see the FAQ S2 Q4. your cvs working directory is most likely
> out of sync somehow.
>
>
> ________________________________
>


________________________________

The information in this Internet e-mail (and any attachments) is confidential, may be legally privileged and is intended solely for the Addressee(s) named above. If you are not the intended recipient, or the employee or agent responsible for delivering it to the intended recipient, then any dissemination or copying of this e-mail (and any attachments) is prohibited and may be unlawful. If you received this e-mail in error, please immediately notify us by e-mail or telephone, then delete the message. Thank you.
_______________________________________________
Rancid-discuss mailing list
Rancid-discuss@shrubbery.net
http://www.shrubbery.net/mailman/listinfo/rancid-discuss
Re: router config diffs [ In reply to ]
On 10/25/18, Wayne Eisenberg <Wayne.Eisenberg@carolinasit.com> wrote:
>> I'd go with changing control_rancid. Search for
>>
>> # Mail out the diffs (if there are any).
>> if [ -s $TMP.diff ] ; then
>
> Bingo. I found my tweak. Thanks, Lee! Instead of actually sending the email,
> I had just redirected it to /dev/null.
>
> - ) | $SENDMAIL -t $MAILOPTS
> + ) > /dev/null
>
> Maybe that could be a config choice in rancid.conf (if it were a global
> switch) or .cloginrc (if you wanted to turn off mail for specific devices or
> groups)?

For a global switch just use your version of sendmail instead of the
system version:
$ cat sendmail
#!/bin/sh
#
# rancid insists on having sendmail
# so give it one
#
echo "" >> /tmp/sendmail.txt
date >> /tmp/sendmail.txt
echo "$*" >> /tmp/sendmail.txt
while read LINE
do
echo $LINE >> /tmp/sendmail.txt
done
echo "" >> /tmp/sendmail.txt

altho you'd probably want it to be just
exit

and if you ever want rancid to actually send mail, have your sendmail
be a link to the real one.

Regards,
Lee


>
> -----Original Message-----
> From: Lee [mailto:ler762@gmail.com]
> Sent: Sunday, October 21, 2018 5:46 PM
> To: Wayne Eisenberg <Wayne.Eisenberg@CarolinasIT.com>
> Cc: rancid-discuss@shrubbery.net
> Subject: Re: [rancid] router config diffs
>
> On 10/21/18, Wayne Eisenberg <Wayne.Eisenberg@carolinasit.com> wrote:
>> Hi,
>>
>> I'm using SVN, not CVS.
>>
>> I probably didn't do a good job of explaining. I'm not getting the
>> same diff over and over. They are new versions, valid diffs. I don't
>> see how svn could get out of sync, when the crontab was inactive
>> (everything rem'ed out) so there was no activity during the upgrade.
>> Before the upgrade, I know there were router config changes taking
>> place and I did not get an email about them. Now I do. So I'm hunting for
>> how to turn the notifications off.
>
> I'd go with changing control_rancid. Search for
>
> # Mail out the diffs (if there are any).
> if [ -s $TMP.diff ] ; then
>
> which looks like the line to change to turn notifications off. Or check the
> FAQ:
> Q. I just want to store configrurations, I do not want to receive diffs.
> How
> can I accomplish this?
> A. Use procmail to filter them out of your inbox.
> OR, redirect the mail aliases in your MTA's aliases file or database to
> a
> mailman list with no subscribers.
> OR, redirect the mail aliases to /dev/null.
> OR, set DIFFSCRIPT in rancid.conf to something that eats it's input,
> such
> as "dd of=/dev/null bs=16k".
>
> Regards,
> Lee
>>
>> I'm also noticing a .cvsignore file in the 'configs' folder in WebSVN.
>> Not sure why that is there or if I should care. It wasn't there before
>> the upgrade.
>>
>> Thanks,
>> Wayne
>>
>>
>> -----Original Message-----
>> From: heasley [mailto:heas@shrubbery.net]
>> Sent: Friday, October 19, 2018 11:47 AM
>> To: Wayne Eisenberg <Wayne.Eisenberg@CarolinasIT.com>
>> Cc: 'rancid-discuss@shrubbery.net' <rancid-discuss@shrubbery.net>
>> Subject: Re: [rancid] router config diffs
>>
>> Fri, Oct 19, 2018 at 05:54:48AM +0000, Wayne Eisenberg:
>>> I just upgraded from 3.1 to 3.8, and all of a sudden I am getting
>>> emails every time there is a change in the config - 'router config diff'
>>> emails.
>>> I must have tweaked something in the previous version so that I
>>> wasn't getting them for every change in config, but I don't remember
>>> what. Is there a switch or conf variable that can turn it off? I just
>>> want to be notified if rancid can't contact a device.
>>>
>>
>> please see the FAQ S2 Q4. your cvs working directory is most likely
>> out of sync somehow.
>>
>>
>> ________________________________
>>
>
>
> ________________________________
>
> The information in this Internet e-mail (and any attachments) is
> confidential, may be legally privileged and is intended solely for the
> Addressee(s) named above. If you are not the intended recipient, or the
> employee or agent responsible for delivering it to the intended recipient,
> then any dissemination or copying of this e-mail (and any attachments) is
> prohibited and may be unlawful. If you received this e-mail in error, please
> immediately notify us by e-mail or telephone, then delete the message. Thank
> you.
> _______________________________________________
> Rancid-discuss mailing list
> Rancid-discuss@shrubbery.net
> http://www.shrubbery.net/mailman/listinfo/rancid-discuss
>

_______________________________________________
Rancid-discuss mailing list
Rancid-discuss@shrubbery.net
http://www.shrubbery.net/mailman/listinfo/rancid-discuss
Re: router config diffs [ In reply to ]
Thu, Oct 25, 2018 at 04:46:48AM +0000, Wayne Eisenberg:
> > I'd go with changing control_rancid. Search for
> >
> > # Mail out the diffs (if there are any).
> > if [ -s $TMP.diff ] ; then
>
> Bingo. I found my tweak. Thanks, Lee! Instead of actually sending the email, I had just redirected it to /dev/null.
>
> - ) | $SENDMAIL -t $MAILOPTS
> + ) > /dev/null
>
> Maybe that could be a config choice in rancid.conf (if it were a global switch) or .cloginrc (if you wanted to turn off mail for specific devices or groups)?
>
> Best Regards,
> Wayne
>
>
> -----Original Message-----
> From: Lee [mailto:ler762@gmail.com]
> Sent: Sunday, October 21, 2018 5:46 PM
> To: Wayne Eisenberg <Wayne.Eisenberg@CarolinasIT.com>
> Cc: rancid-discuss@shrubbery.net
> Subject: Re: [rancid] router config diffs
>
> On 10/21/18, Wayne Eisenberg <Wayne.Eisenberg@carolinasit.com> wrote:
> > Hi,
> >
> > I'm using SVN, not CVS.
> >
> > I probably didn't do a good job of explaining. I'm not getting the
> > same diff over and over. They are new versions, valid diffs. I don't
> > see how svn could get out of sync, when the crontab was inactive
> > (everything rem'ed out) so there was no activity during the upgrade.
> > Before the upgrade, I know there were router config changes taking
> > place and I did not get an email about them. Now I do. So I'm hunting for how to turn the notifications off.
>
> I'd go with changing control_rancid. Search for

why? there are 3 manners of affecting the same result, but without modifying
the installed base and without needing to remember that change following the
next upgrade. embrace the unix methodology - assemble (pipe) simple tools
for complex results.

> # Mail out the diffs (if there are any).
> if [ -s $TMP.diff ] ; then
>
> which looks like the line to change to turn notifications off. Or check the FAQ:
> Q. I just want to store configrurations, I do not want to receive diffs. How
> can I accomplish this?
> A. Use procmail to filter them out of your inbox.
> OR, redirect the mail aliases in your MTA's aliases file or database to a
> mailman list with no subscribers.
> OR, redirect the mail aliases to /dev/null.
> OR, set DIFFSCRIPT in rancid.conf to something that eats it's input, such
> as "dd of=/dev/null bs=16k".
>
> Regards,
> Lee
> >
> > I'm also noticing a .cvsignore file in the 'configs' folder in WebSVN.
> > Not sure why that is there or if I should care. It wasn't there before
> > the upgrade.
> >
> > Thanks,
> > Wayne
> >
> >
> > -----Original Message-----
> > From: heasley [mailto:heas@shrubbery.net]
> > Sent: Friday, October 19, 2018 11:47 AM
> > To: Wayne Eisenberg <Wayne.Eisenberg@CarolinasIT.com>
> > Cc: 'rancid-discuss@shrubbery.net' <rancid-discuss@shrubbery.net>
> > Subject: Re: [rancid] router config diffs
> >
> > Fri, Oct 19, 2018 at 05:54:48AM +0000, Wayne Eisenberg:
> >> I just upgraded from 3.1 to 3.8, and all of a sudden I am getting
> >> emails every time there is a change in the config - 'router config diff' emails.
> >> I must have tweaked something in the previous version so that I
> >> wasn't getting them for every change in config, but I don't remember
> >> what. Is there a switch or conf variable that can turn it off? I just
> >> want to be notified if rancid can't contact a device.
> >>
> >
> > please see the FAQ S2 Q4. your cvs working directory is most likely
> > out of sync somehow.
> >
> >
> > ________________________________
> >
>
>
> ________________________________
>
> The information in this Internet e-mail (and any attachments) is confidential, may be legally privileged and is intended solely for the Addressee(s) named above. If you are not the intended recipient, or the employee or agent responsible for delivering it to the intended recipient, then any dissemination or copying of this e-mail (and any attachments) is prohibited and may be unlawful. If you received this e-mail in error, please immediately notify us by e-mail or telephone, then delete the message. Thank you.
> _______________________________________________
> Rancid-discuss mailing list
> Rancid-discuss@shrubbery.net
> http://www.shrubbery.net/mailman/listinfo/rancid-discuss

_______________________________________________
Rancid-discuss mailing list
Rancid-discuss@shrubbery.net
http://www.shrubbery.net/mailman/listinfo/rancid-discuss
Re: router config diffs [ In reply to ]
On 10/25/18, heasley <heas@shrubbery.net> wrote:
> Thu, Oct 25, 2018 at 04:46:48AM +0000, Wayne Eisenberg:
>> > I'd go with changing control_rancid. Search for
>> >
>> > # Mail out the diffs (if there are any).
>> > if [ -s $TMP.diff ] ; then
>>
>> Bingo. I found my tweak. Thanks, Lee! Instead of actually sending the
>> email, I had just redirected it to /dev/null.
>>
>> - ) | $SENDMAIL -t $MAILOPTS
>> + ) > /dev/null
>>
>> Maybe that could be a config choice in rancid.conf (if it were a global
>> switch) or .cloginrc (if you wanted to turn off mail for specific devices
>> or groups)?
>>
>>
>> -----Original Message-----
>> From: Lee [mailto:ler762@gmail.com]
>> Sent: Sunday, October 21, 2018 5:46 PM
>> To: Wayne Eisenberg <Wayne.Eisenberg@CarolinasIT.com>
>> Cc: rancid-discuss@shrubbery.net
>> Subject: Re: [rancid] router config diffs
>>
>> On 10/21/18, Wayne Eisenberg <Wayne.Eisenberg@carolinasit.com> wrote:
<.. snip ..>
>> > I probably didn't do a good job of explaining. I'm not getting the
>> > same diff over and over. They are new versions, valid diffs. I don't
>> > see how svn could get out of sync, when the crontab was inactive
>> > (everything rem'ed out) so there was no activity during the upgrade.
>> > Before the upgrade, I know there were router config changes taking
>> > place and I did not get an email about them. Now I do. So I'm hunting
>> > for how to turn the notifications off.
>>
>> I'd go with changing control_rancid. Search for
>
> why? there are 3 manners of affecting the same result, but without
> modifying the installed base and without needing to remember that
> change following the next upgrade. embrace the unix
> methodology - assemble (pipe) simple tools for complex results.

I haven't tried this, but it sure looks like one could build rancid with
export SENDMAIL=/usr/local/bin/sendmail_alt
./configure --prefix= ..etc..

and have /usr/local/bin/sendmail_alt be just
exit

and that would take care of not sending emails or doing something
other than sending mail. Yes? but that means you'd have to build
rancid instead of just installing from some repository..

In any case, I went with changing control_rancid because there were a
few other things I wanted to do like filtering out passwords, keys,
hashes, etc. from the mail msg before sending it. So right after the
# Diff the directory and then checkin.
section I added

# -LR- begin: remove passwords, etc. from diff listing
/usr/local/bin/sanitize.sh $TMP.diff >$TMP.diff2
/bin/mv $TMP.diff2 $TMP.diff
# -LR- end : remove passwords etc. from diff listing

Regards,
Lee

_______________________________________________
Rancid-discuss mailing list
Rancid-discuss@shrubbery.net
http://www.shrubbery.net/mailman/listinfo/rancid-discuss
Re: router config diffs [ In reply to ]
Thu, Oct 25, 2018 at 04:33:45PM -0400, Lee:
> On 10/25/18, heasley <heas@shrubbery.net> wrote:
> > Thu, Oct 25, 2018 at 04:46:48AM +0000, Wayne Eisenberg:
> >> > I'd go with changing control_rancid. Search for
> >> >
> >> > # Mail out the diffs (if there are any).
> >> > if [ -s $TMP.diff ] ; then
> >>
> >> Bingo. I found my tweak. Thanks, Lee! Instead of actually sending the
> >> email, I had just redirected it to /dev/null.
> >>
> >> - ) | $SENDMAIL -t $MAILOPTS
> >> + ) > /dev/null
> >>
> >> Maybe that could be a config choice in rancid.conf (if it were a global
> >> switch) or .cloginrc (if you wanted to turn off mail for specific devices
> >> or groups)?
> >>
> >>
> >> -----Original Message-----
> >> From: Lee [mailto:ler762@gmail.com]
> >> Sent: Sunday, October 21, 2018 5:46 PM
> >> To: Wayne Eisenberg <Wayne.Eisenberg@CarolinasIT.com>
> >> Cc: rancid-discuss@shrubbery.net
> >> Subject: Re: [rancid] router config diffs
> >>
> >> On 10/21/18, Wayne Eisenberg <Wayne.Eisenberg@carolinasit.com> wrote:
> <.. snip ..>
> >> > I probably didn't do a good job of explaining. I'm not getting the
> >> > same diff over and over. They are new versions, valid diffs. I don't
> >> > see how svn could get out of sync, when the crontab was inactive
> >> > (everything rem'ed out) so there was no activity during the upgrade.
> >> > Before the upgrade, I know there were router config changes taking
> >> > place and I did not get an email about them. Now I do. So I'm hunting
> >> > for how to turn the notifications off.
> >>
> >> I'd go with changing control_rancid. Search for
> >
> > why? there are 3 manners of affecting the same result, but without
> > modifying the installed base and without needing to remember that
> > change following the next upgrade. embrace the unix
> > methodology - assemble (pipe) simple tools for complex results.
>
> I haven't tried this, but it sure looks like one could build rancid with
> export SENDMAIL=/usr/local/bin/sendmail_alt
> ./configure --prefix= ..etc..
>
> and have /usr/local/bin/sendmail_alt be just
> exit

youre making that more difficult than necessary,

export SENDMAIL="dd of=/dev/null bs=32k"

but, you still want the admin email, imiho, and that will break it.

> and that would take care of not sending emails or doing something
> other than sending mail. Yes? but that means you'd have to build
> rancid instead of just installing from some repository..
>
> In any case, I went with changing control_rancid because there were a
> few other things I wanted to do like filtering out passwords, keys,
> hashes, etc. from the mail msg before sending it. So right after the
> # Diff the directory and then checkin.
> section I added
>
> # -LR- begin: remove passwords, etc. from diff listing
> /usr/local/bin/sanitize.sh $TMP.diff >$TMP.diff2
> /bin/mv $TMP.diff2 $TMP.diff
> # -LR- end : remove passwords etc. from diff listing

this too is possible without changing control_rancid; see rancid.conf(5)
for FILTER_PWDS & DIFFSCRIPT.

_______________________________________________
Rancid-discuss mailing list
Rancid-discuss@shrubbery.net
http://www.shrubbery.net/mailman/listinfo/rancid-discuss
Re: router config diffs [ In reply to ]
On 10/25/18, heasley <heas@shrubbery.net> wrote:
> Thu, Oct 25, 2018 at 04:33:45PM -0400, Lee:
<.. snip lots ..>
>> I haven't tried this, but it sure looks like one could build rancid with
>> export SENDMAIL=/usr/local/bin/sendmail_alt
>> ./configure --prefix= ..etc..
>>
>> and have /usr/local/bin/sendmail_alt be just
>> exit
>
> youre making that more difficult than necessary,
>
> export SENDMAIL="dd of=/dev/null bs=32k"
>
> but, you still want the admin email, imiho, and that will break it.
>
>> and that would take care of not sending emails or doing something
>> other than sending mail. Yes? but that means you'd have to build
>> rancid instead of just installing from some repository..
>>
>> In any case, I went with changing control_rancid because there were a
>> few other things I wanted to do like filtering out passwords, keys,
>> hashes, etc. from the mail msg before sending it. So right after the
>> # Diff the directory and then checkin.
>> section I added
>>
>> # -LR- begin: remove passwords, etc. from diff listing
>> /usr/local/bin/sanitize.sh $TMP.diff >$TMP.diff2
>> /bin/mv $TMP.diff2 $TMP.diff
>> # -LR- end : remove passwords etc. from diff listing
>
> this too is possible without changing control_rancid; see rancid.conf(5)
> for FILTER_PWDS & DIFFSCRIPT.

FILTER_PWDS
Determines which passwords will be filtered from configs.

I don't want anything filtered from rancid; it's just email where I
want passwords to be filtered out. Maybe I could figure out how to
set DIFFSCRIPT to accomplish that, but I already had a script for
blanking out sensitive info for when the security office or whoever
wants to do an audit & demands a copy of all the configs. So I could
add a few lines to control_rancid and call a script I already knew
worked or spend who knows how long trying to figure how to set
DIFFSCRIPT .. and expediency won.

Regards,
Lee

_______________________________________________
Rancid-discuss mailing list
Rancid-discuss@shrubbery.net
http://www.shrubbery.net/mailman/listinfo/rancid-discuss
Re: router config diffs [ In reply to ]
Thanks, that's an interesting idea although what I was really thinking of was turning off the emailing of diffs, not totally disabling mail. (It would still be important to know if rancid lost contact with devices.)
If that were part of the official control_rancid, then it could be controlled by a variable in the rancid.conf file. Just a newbie idea.


-----Original Message-----
From: Lee [mailto:ler762@gmail.com]
Sent: Thursday, October 25, 2018 4:17 AM
To: Wayne Eisenberg <Wayne.Eisenberg@CarolinasIT.com>
Cc: rancid-discuss@shrubbery.net
Subject: Re: [rancid] router config diffs

On 10/25/18, Wayne Eisenberg <Wayne.Eisenberg@carolinasit.com> wrote:
>> I'd go with changing control_rancid. Search for
>>
>> # Mail out the diffs (if there are any).
>> if [ -s $TMP.diff ] ; then
>
> Bingo. I found my tweak. Thanks, Lee! Instead of actually sending the
> email, I had just redirected it to /dev/null.
>
> - ) | $SENDMAIL -t $MAILOPTS
> + ) > /dev/null
>
> Maybe that could be a config choice in rancid.conf (if it were a
> global
> switch) or .cloginrc (if you wanted to turn off mail for specific
> devices or groups)?

For a global switch just use your version of sendmail instead of the system version:
$ cat sendmail
#!/bin/sh
#
# rancid insists on having sendmail
# so give it one
#
echo "" >> /tmp/sendmail.txt
date >> /tmp/sendmail.txt
echo "$*" >> /tmp/sendmail.txt
while read LINE
do
echo $LINE >> /tmp/sendmail.txt
done
echo "" >> /tmp/sendmail.txt

altho you'd probably want it to be just
exit

and if you ever want rancid to actually send mail, have your sendmail be a link to the real one.

Regards,
Lee


________________________________

The information in this Internet e-mail (and any attachments) is confidential, may be legally privileged and is intended solely for the Addressee(s) named above. If you are not the intended recipient, or the employee or agent responsible for delivering it to the intended recipient, then any dissemination or copying of this e-mail (and any attachments) is prohibited and may be unlawful. If you received this e-mail in error, please immediately notify us by e-mail or telephone, then delete the message. Thank you.
_______________________________________________
Rancid-discuss mailing list
Rancid-discuss@shrubbery.net
http://www.shrubbery.net/mailman/listinfo/rancid-discuss