Koozali.org: home of the SME Server

Template Naming Convention

Offline GlitchFreak

  • ****
  • 97
  • +0/-0
Template Naming Convention
« on: November 04, 2007, 07:57:16 PM »
Hey there

Can someone please explain to me how the template naming convention works? I've read the dev guide but I haven't found anything.

eg. 10acls, 25httpaccess

I'm trying to customise my squid.conf. Have succeeded slightly but I need to place acl's etc on specific lines but I'm not getting that to work.

Thanks!


Offline cactus

  • *
  • 4,880
  • +3/-0
    • http://www.snetram.nl
Re: Template Naming Convention
« Reply #1 on: November 04, 2007, 08:01:53 PM »
Can someone please explain to me how the template naming convention works? I've read the dev guide but I haven't found anything.

eg. 10acls, 25httpaccess

I'm trying to customise my squid.conf. Have succeeded slightly but I need to place acl's etc on specific lines but I'm not getting that to work.
The numbers are there to keep a certain order in the configuration file. You could have more or less concluded it form this section in the devguide:
Templates are stored under /etc/e-smith/templates/ in a directory hierarchy which matches the standard filesystem. For example, the template for /etc/inittab is stored in the /etc/e-smith/templates/etc/inittab/  directory. Each template is stored as a directory of template fragments and processed by the Perl Text::Template module.

The template fragments are concatenated together in ASCIIbetical order (US-ASCII sort order) and the complete file is parsed to generate the appropriate configuration files for the service. The use of fragments is part of the SME Server's modular and extensible architecture; it allows third-party modules to add fragments to the configuration where necessary.
« Last Edit: November 04, 2007, 08:05:08 PM by cactus »
Be careful whose advice you buy, but be patient with those who supply it. Advice is a form of nostalgia, dispensing it is a way of fishing the past from the disposal, wiping it off, painting over the ugly parts and recycling it for more than its worth ~ Baz Luhrmann - Everybody's Free (To Wear Sunscreen)

Offline GlitchFreak

  • ****
  • 97
  • +0/-0
Re: Template Naming Convention
« Reply #2 on: November 04, 2007, 08:13:56 PM »
So I could just name them in sequential order and they will appear in that order?

Offline cactus

  • *
  • 4,880
  • +3/-0
    • http://www.snetram.nl
Re: Template Naming Convention
« Reply #3 on: November 04, 2007, 08:16:47 PM »
So I could just name them in sequential order and they will appear in that order?
Yes but keep in mind to not alter the original fragments, make copies of them to the *-custom tree and make modifications there. If you want to have something in between, choose a number in between and add your directives there.
Be careful whose advice you buy, but be patient with those who supply it. Advice is a form of nostalgia, dispensing it is a way of fishing the past from the disposal, wiping it off, painting over the ugly parts and recycling it for more than its worth ~ Baz Luhrmann - Everybody's Free (To Wear Sunscreen)

Offline GlitchFreak

  • ****
  • 97
  • +0/-0
Re: Template Naming Convention
« Reply #4 on: November 04, 2007, 08:21:58 PM »
Shot Cactus. Thanks bro!  :)