Koozali.org: home of the SME Server

ip-up.local problem

Thomas Dabbel

ip-up.local problem
« on: June 12, 2002, 01:57:09 AM »
Hi all,

im very new to e-smith, have read the whole docu and faq twice
but cant find an answer of my problem.
i want a command everytime ppp dials my provider.
so i put a line in /etc/ppp/ip-up.local.
but everytime i reboot this command has gone.

somebody can tell me what to do - im sorry but dont understand
the way of creating an own template.

tia and regards
thomas

Nathan Fowler

Re: ip-up.local problem
« Reply #1 on: June 12, 2002, 06:29:54 AM »
Thomas, not a problem.  While very powerful the templating system can often be confusing and "cumbersome" for new users.  What you want to do is:

# Create a custom template directory
console>mkdir -p /etc/e-smith/templates-custom/etc/ppp/ip-up.local

# Create the actual template
pico -w runonconnect

# Add the code to run the file/binary you wanted.  Save your changes.

# Expand the template
/sbin/e-smith/expand-template /etc/ppp/ip-up.local

Next, pico /etc/ppp/ip-up.local making sure your changes are visible and in the correct position.  I'm not very familiar with ppp because I use broadband.  If it's expanding the custom template in the wrong place you can always edit the template directly.  This isn't advisible but sometimes it's a solution.

The master templates are stored in /etc/e-smith/templates

Hope this helped.  The templating system is very powerful, easy to use, and an excellent solution to controlling configuration files.

Nathan

Nathan Fowler

Re: ip-up.local problem
« Reply #2 on: June 12, 2002, 06:32:00 AM »
Sorry, I made a typo.  After running:

console>mkdir -p /etc/e-smith/templates-custom/etc/ppp/ip-up.local

Be sure you:
cd /etc/e-smith/templates-custom/etc/ppp/ip-up.local
before you:
pico -w runonconnect

Thomas Dabbel

Re: ip-up.local problem
« Reply #3 on: June 12, 2002, 03:45:18 PM »
Hi   Nathan,

thank you very mutch - it works very great!!!
Is there a howto/faq from Mitel that describes the template system?

regards
Thomas

Nathan Fowler

Re: ip-up.local problem
« Reply #4 on: June 12, 2002, 06:40:06 PM »
To be quite honest I'm not sure.  But, it's really not difficult.  Basically a single configuration file is made up from many "templates".  Those templates are programmatically (spelling?) merged when the expand-template event is called.  You could really use the above steps for any template, within reason.

Glad everything worked out well.

Nathan