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/leaf-tools/ which I think will probably be the base of the thing with minor modifications. -- ----------------------------------------------------------------------- Chad Carr [EMAIL PROTECTED] -----------------------------------------------------------------------
signature.asc
Description: This is a digitally signed message part