------------------------------------------------------------ revno: 13247 revision-id: squid3@treenet.co.nz-20140127030615-4rqcfxecjz05pp2b parent: squid3@treenet.co.nz-20140127021108-gtcw0wghdsgrygn0 committer: Amos Jeffries branch nick: trunk timestamp: Sun 2014-01-26 20:06:15 -0700 message: Add ${service_name} macro to squid.conf processing This allows squid.conf directives to be configured per-service by expanding into the -n service_name parameter. The default is "squid". ------------------------------------------------------------ # Bazaar merge directive format 2 (Bazaar 0.90) # revision_id: squid3@treenet.co.nz-20140127030615-4rqcfxecjz05pp2b # target_branch: http://bzr.squid-cache.org/bzr/squid3/trunk/ # testament_sha1: 9804ffa02390cc1dfbb94cca2322139f4c805520 # timestamp: 2014-01-27 03:53:49 +0000 # source_branch: http://bzr.squid-cache.org/bzr/squid3/trunk/ # base_revision_id: squid3@treenet.co.nz-20140127021108-\ # gtcw0wghdsgrygn0 # # Begin patch === modified file 'src/cache_cf.cc' --- src/cache_cf.cc 2013-10-25 00:13:46 +0000 +++ src/cache_cf.cc 2014-01-27 03:06:15 +0000 @@ -379,6 +379,7 @@ static void ProcessMacros(char*& line, int& len) { + SubstituteMacro(line, len, "${service_name}", service_name); SubstituteMacro(line, len, "${process_name}", TheKidName); SubstituteMacro(line, len, "${process_number}", xitoa(KidIdentifier)); } === modified file 'src/cf.data.pre' --- src/cf.data.pre 2014-01-12 17:51:12 +0000 +++ src/cf.data.pre 2014-01-27 03:06:15 +0000 @@ -114,7 +114,11 @@ ${process_number} expands to the current Squid process identifier, which is an integer number (e.g., 1, 2, 3) unique - across all Squid processes. + across all Squid processes of the current service instance. + + ${service_name} expands into the current Squid service instance + name identifier which is provided by -n on the command line. + COMMENT_END # options still not yet ported from 2.7 to 3.x