I think this is an argument for either (or both) of:

* Giving up on the idea of listening on a "unique" IP address and instead
  using just a "unique" port on 127.0.0.1

* Using the IP address instead of a hosts entry; proxyMap can take
  IP addresses as well as hostnames.

I don't like the idea of modifying /etc/hosts.  It's too fragile.

On Sat, Apr 20, 2013 at 10:02:20PM +0200, Rune Morling wrote:
> So,
>
> When installing conary-proxy, I want to mangle %(root)s/etc/hosts like so:
>
> #/bin/sh
> #
> # Set up a loopback IP address for conaryLocalProxy if one is not
> # already defined.
> #
> # Since it does no harm, we'll simply leave it in /etc/hosts upon
> # uninstallation
> #
> if [ -f /etc/hosts -a -x /bin/egrep ]; then
>   MATCH=`egrep -E -c -e 
> '^([[:digit:]]{1,3}\.){3}[[:digit:]]{1,3}[[:space:]].*conaryLocalProxy.*$' 
> /etc/hosts`
>   #echo "MATCH is = _ $MATCH _"
>   if [ "$MATCH" -eq "0" ]; then
>     #echo -n "appending to /etc/hosts..."
>     echo "127.25.11.73            conaryLocalProxy" >> /etc/hosts
>     #echo " Done."
>   fi
> fi
>
>
> But where would I put this script, how would I execute it and which 
> Conary-related substitutions would it need?  Any help would be greatly 
> appreciated. (=
>
> _______________________________________________
> Foresight-devel mailing list
> [email protected]
> https://lists.foresightlinux.org/mailman/listinfo/foresight-devel

_______________________________________________
Foresight-devel mailing list
[email protected]
https://lists.foresightlinux.org/mailman/listinfo/foresight-devel

Reply via email to