[Serusers] Help on managing ser.cfg

Alan Litster alitster at telcoelectronics.co.uk
Tue Aug 17 18:59:54 CEST 2004



Assuming you have a file called ser.def containing something like
GW1	gateway1.mydomin.com
GW2	gateway2.mydomin.com

and your ser config file is called ser.cfg.in and has the host entries as
@GW1@,
the following will generate ser.cfg based on those two files.

awk '$1 != "" {print "-e s/@"$1"@/"$2"/g"}' ser.def | xargs sed ser.cfg.in >
ser.cfg


Regards,

Alan


-----Original Message-----
From: Steve Blair [mailto:blairs at isc.upenn.edu]
Sent: 17 August 2004 12:48
To: Alan Litster
Cc: SER Mailing List
Subject: Re: [Serusers] Help on managing ser.cfg



Alan:

   I need this functionality too. I was looking at cobbling together
something
using exec but if you find a better way I'd like to hear about it.

Thanks,Steve

Alan Litster wrote:

>Hi List,
>
>My ser.cfg file has grown quite large now and it's becoming quite hard to
>manage all the gateways. For example, if we need to change them.
>
>What I'd like to have is a file that contains the hosts, e.g.
>@GW1@	gateway1.mydomin.com
>@GW2@	gateway2.mydomin.com
>
>then have a ser.cfg.template script where I'd define the hosts in the
>forward/reply commands as @GW1@ etc.. and run a shell script/command on
that
>file to generate the master ser.cfg file.
>
>My question is that is there already a program available that would allow
me
>to do this kind of thing?
>
>Regards,
>
>Alan
>
>
>---------------------------------------------------------------------------
----------------------------
>This email, and any files transmitted with it, is copyright and may contain
confidential information.
>The contents are intended for the use of the addressee(s) only.
>Unauthorized use may be unlawful.
>If you receive this email by mistake, please advise sender immediately.
>The views of the author may not necessarily constitute the views of Telco
Electronics Limited.
>Nothing in this mail shall bind Telco Electronics Limited in any contract
or obligation.
>
>Telco Electronics Limited
>6-8 Oxford Court
>Brackley
>Northants
>NN13 7XY
>
>Tel 07000 701999
>Fax 07000 701777
>
>_______________________________________________
>Serusers mailing list
>serusers at lists.iptel.org
>http://lists.iptel.org/mailman/listinfo/serusers
>
>

--

ISC Network Engineering
The University of Pennsylvania
3401 Walnut Street, Suite 221A
Philadelphia, PA 19104


voice: 215-573-8396

       215-746-7903

fax: 215-898-9348

sip:blairs at upenn.edu


-------------------------------------------------------------------------------------------------------
This email, and any files transmitted with it, is copyright and may contain confidential information.
The contents are intended for the use of the addressee(s) only.
Unauthorized use may be unlawful.
If you receive this email by mistake, please advise sender immediately.
The views of the author may not necessarily constitute the views of Telco Electronics Limited.
Nothing in this mail shall bind Telco Electronics Limited in any contract or obligation.

Telco Electronics Limited
6-8 Oxford Court
Brackley
Northants
NN13 7XY

Tel 07000 701999
Fax 07000 701777




More information about the sr-users mailing list