Excellent !  You mention that "tmpl" is currently broken.  Does that mean
that currently this will not work:

"cdb get tree network | tmpl -o /etc/network/interfaces"

TIA..Steve

-----Original Message-----
From: Chad Carr
To: [EMAIL PROTECTED]
Sent: 3/5/03 10:24 PM
Subject: Re: [leaf-devel] Web Config for Interfaces File

On Wed, 2003-03-05 at 18:33, Steve Bihari wrote:
> Hi All,
> 
> I am pretty new to LEAF and Bering in particular.
> 
> I'm trying to develop a simple web form to configure the Bering
> interfaces (i.e. /etc/network/interfaces) file.  Unfortunately I'm not
> (yet) an expert at "shell scripting" - especially string handling.
> 
> Has anyone developed a simple script that will write a new file
> /etc/network/interfaces file from the contents of a simple form?
Let's
> just start with a "static" interface for now...I'd like to rewrite the
> interface file based on just the following form data:
> 
> IP Address: 
> Mask Length:
> Broadcast Address:
> 
> Now the "auto iface <if_name>" and the "iface <if_name> inet <static,
> dhcp, ppp>" can be left untouched (for now), so all I need to change
is
> whatever follows the "address", "masklen", and "broadcast" keywords -
if
> the if_type is set to "inet static".  I'll soon have a form that will
> allow you to select the interface type and will need to implement this
> for all types of interfaces.  But for now, to keep things simple, I
just
> wanted to attempt changing of a static interface ! 
> 
> Is this very difficult to do?  Does this make sense?

It is difficult to do properly by itself.  The main problem is ensuring
consistency.  What you are trying to do is an effort of the centralized
config-db/web interface people.  You might want to wait a bit until we
put the finishing touches on some infrastructure elements that will make
that job a whole lot easier.  Also, you can check out the code in my cvs
repository at

http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/leaf/devel/ccarr/devel/le
af-tools/

which I think will probably be the base of the thing with minor
modifications.

-- 
-----------------------------------------------------------------------
Chad Carr                                         [EMAIL PROTECTED]
-----------------------------------------------------------------------


-------------------------------------------------------
This SF.net email is sponsored by: Etnus, makers of TotalView, The debugger 
for complex code. Debugging C/C++ programs can leave you feeling lost and 
disoriented. TotalView can help you find your way. Available on major UNIX 
and Linux platforms. Try it free. www.etnus.com

_______________________________________________
leaf-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/leaf-devel

Reply via email to