[rancid] How .cloginrc works and can i have separate .cloginrc files for each group
Adrian Dimitrov
adrian.dimitrov at efellows.bg
Mon Feb 20 15:23:24 UTC 2017
Almost the same as I did. Thanks for the examples. My mistake was that I was not adding "export CLOGINRC", so rancid wouldn't know where to search the file and worked as default.
Best Regards,
Adrian Dimitrov
System Administrator
-----Original Message-----
From: Lee [mailto:ler762 at gmail.com]
Sent: Monday, February 20, 2017 5:18 PM
To: Adrian Dimitrov <adrian.dimitrov at efellows.bg>
Cc: rancid-discuss at shrubbery.net
Subject: Re: [rancid] How .cloginrc works and can i have separate .cloginrc files for each group
On 2/20/17, Adrian Dimitrov <adrian.dimitrov at efellows.bg> wrote:
> Hello Again,
>
> I made it work with adding the following:
>
> CLOGINRC="/usr/local/rancid/var/Group/.cloginrc"; export CLOGINRC
>
> Still an example will be apriciated.
I just looked at the code (ie. haven't actually tried it) & control_rancid has this bit:
DIR=$BASEDIR/$GROUP
...
cd $DIR
if [ -f "rancid.conf" ] ; then
. ./rancid.conf
fi
so let's say rancid was installed in /usr/local/rancid and your groups are LIST_OF_GROUPS="sl joebobisp"
create /usr/local/rancid/var/sl/rancid.conf with CLOGINRC=${HOME}/.cloginrc_sl; export CLOGINRC
and /usr/local/rancid/var/joebobisp/rancid.conf with CLOGINRC=${HOME}/.cloginrc_joebobisp; export CLOGINRC
then your group-specific cloginrc files are ~/.cloginrc_sl and ~/.cloginrc_joebobisp
Regards,
Lee
>
> Best Regards,
> Adrian Dimitrov
> System Administrator
>
>
> -----Original Message-----
> From: Adrian Dimitrov
> Sent: Monday, February 20, 2017 11:49 AM
> To: 'heasley' <heas at shrubbery.net>
> Cc: rancid-discuss at shrubbery.net
> Subject: RE: [rancid] How .cloginrc works and can i have separate
> .cloginrc files for each group
>
> Hello Heasley , team ,
>
> I tried another thing, adjusting .cloginrc file with include <file>,
> and made a new file for each group/customer. This works as a charm,
> but still, it is not suitable for our environment, so I tried to add
> variable to custom rancid.conf file, but unfortunately it didn't work.
> I am still not skillful enough, can u please give me a simple example.
>
> What I did was:
> 1. Copied original rancid.conf and move it to Group1 directory, same
> thing for .cloginrc.
> 2. creating variable .cloginrc=Directory where the new file is, in
> this case directory of group1.
>
> Still rancid is using the original .cloginrc file or if there is no
> such file I get an error.
>
> Best Regards,
> Adrian Dimitrov
> System Administrator
>
>
> -----Original Message-----
> From: heasley [mailto:heas at shrubbery.net]
> Sent: Thursday, February 16, 2017 6:46 PM
> To: Adrian Dimitrov <adrian.dimitrov at efellows.bg>
> Cc: heasley <heas at shrubbery.net>; rancid-discuss at shrubbery.net
> Subject: Re: [rancid] How .cloginrc works and can i have separate
> .cloginrc files for each group
>
> Thu, Feb 16, 2017 at 04:36:46PM +0000, Adrian Dimitrov:
>> Hello I get the point and went through the manuals, one last thing, I
>> cannot find where in the rancid.conf file I can set which .cloginrc
>> to use.
>
> just add a line; its just shell variables.
>
>> One last thing I guess custom rancid.conf should be copied from the
>> original one and customized.
>
> customize it.
>
> _______________________________________________
> Rancid-discuss mailing list
> Rancid-discuss at shrubbery.net
> http://www.shrubbery.net/mailman/listinfo/rancid-discuss
>
More information about the Rancid-discuss
mailing list