RE: [squid-users] When will squid support smp?

From: Chemolli Francesco (USI) <ChemolliF@dont-contact.us>
Date: Thu, 29 Nov 2001 14:10:11 +0100

> Joe Cooper wrote:
>
> > Robert mentioned in a private email conversation a while
> back that he
> > had implemented an include directive for squid.conf--that
> would be even
> > better for cluster and multi-process Squid environments.
> Just for the
> > record, I'd love to see that go into the official Squid 2.[56].
>
> 2.6 maybe. 2.5 is already overdue.

I have developed a gnu-cpp(1) system to parametrize my squid configuration.
Works like a charm.

Simpy create a "master" configuration file,
prefix it with

#!/lib/cpp -lang-c89

and make it executable.

I then added

#if !defined(HOST2) && !defined(HOST1)
#define HOST1
#endif

this sets a default

#ifdef HOST1
directive_for host1
#endif
#ifdef HOST2
directive_for host2
#endif

directive_for both hosts

the -lang-c89 flag is needed so that cpp won't interpret // as comment
initiator.

To perform configuration, run (!) the configuration file with no arguments
for HOST1, and with arg -DHOST2 for host 2 (and so on).
it will spit on stdout the configuration file proper. Ignore the warning
about the
syntax error on line 1. It's just cpp not liking the #!.

-- 
	/kinkie
Received on Thu Nov 29 2001 - 05:58:13 MST

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 17:04:43 MST