How to best handle three offices with three different sets of repositories and different proxies?
Rainer M Krug
rainer.linux at krugs.de
Thu Nov 29 00:15:20 PST 2007
Hi Grant
thanks for your suggestion
Some questions below:
Grant McWilliams wrote:
> I have a similar situation. I've settled on storing my channels in a
> channels.txt file and my mirrors in a mirrors.txt file. Then once you
> have that
> you can just have a 5 line shell script that sets the proxies (http and
> ftp) and sucks in the channels.txt and mirrors.txt files.
>
> *Creating the files*
>
> smart channel --show > channels.txt
> smart mirror --show > mirrors.txt
>
>
> *The shell script*
>
> #!/bin/bash
>
> smart config --set http-proxy=
> http://username:password@proxy-ip:port
> <http://username:password@proxy-ip/>
> smart config --set ftp-proxy=http://username:password@proxy-ip:port
> <http://username:password@proxy-ip/>
>
> smart channel --add channels.txt
>
> smart mirror --add mirrors.txt
this solution sounds easy enough - but if I switch to the other site,
don't I have to remove the channels and mirrors from the previos one to
only have one set?
>
>
> This is a simple version of our solution. We actually have a role based
> solution and the script checks a system variable for the ROLE and then
> sets up proxies and repositories accordingly. We also have boxes that
> move in and out of the network so the proxy code is automatic now. When
> you boot up it checks to see if it can ping the proxy and if not it
> turns the proxies off (for wget, smartpm, firefox and links). If the
> proxy machine can be pinged then it turns the proxies on.
That sounds FANTASTIC! Because I am struggling with different profiles
for the different offices for many programms. Could you probably give me
a hint on how to do this or even mail me the batch file you are using?
Thanks a million,
Rainer
>
> Grant
>
> On Nov 28, 2007 11:02 PM, Rainer M Krug <rainer.linux at krugs.de
> <mailto:rainer.linux at krugs.de>> wrote:
>
> Hi
>
> I am working at two different offices in which I have to use different
> proxy settings and different repositories.
> Up to now, I just changed the proxy settinges in the config file with a
> batch file and started smart as usual, but this does not work for the
> different repositories. I thought that I could use differfent config
> files and then by using the --config-file option select the appropriate
> config file. But I guess, that the repository addresses are not stored
> in the config file - what is the best way of handling this situation?
> Define all repositories and then just enabling the ones relevant to the
> sit I am at (and would that be stored in the config file?)? Or do I
> have
> to use different config directories? The repositories are the same -
> they are just different mirrors. Could I use the mirror optionthen?
>
> Any ideas welcome,
>
> Rainer
>
>
>
>
> --
> Some people, when confronted with a problem, think "I know, I'll use
> Windows."
> Now they have two problems.
More information about the Smart
mailing list