How to best handle three offices with three different sets of repositories and different proxies?

Grant McWilliams grantmasterflash at gmail.com
Wed Nov 28 23:58:47 PST 2007


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 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.

Grant

On Nov 28, 2007 11:02 PM, Rainer M Krug <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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.labix.org/pipermail/smart-labix.org/attachments/20071128/90109934/attachment-0003.htm>


More information about the Smart mailing list