Hello!

I have some suggestions on how to build a web configuration interface for OpenWRT.
I also have some ideas for a more general approach to configuring the OpenWRT-System.

First of all: I really like the NVRAM! It's really cool to have all the options stored in a place
where they won't be overwritten by the next firmware release. I'd really like to have that
in the future. But there is also the problem with machines that don't have an NVRAM, right?

Here is my idea:
We can write a program (for example called "wrtconf") that basically does the same as the
nvram command on the wrt54g, but takes a parameter where to store the values.
The new command can then store the values either in NVRAM or in a flat-file format
somewhere on the system.

All the configuration scripts would have to be altered in a very simple way: The would have
to call "wrtconf get param_name" instead of "nvram get param_name".

Now the web interface: Every package includes a small file, that list the configuration options,
the choices you have for them and a small description for every parameter. With this kind
of file you can easily write a web interface or a even a menu driven shell interface (i've seen
that kind of configuration interface on HP Switches and i really like it.)

Example for such a file that the package maintainers would have to include:

# cat /usr/share/wrtconf/dnsmasq
name DNS-Server
option dnsmasq_enabled {
          desc "Run a DNS server?"
          type chose
          choice 1 "Enable DNS-Server"
          choice 0 "Do not run a DNS-Server"
}
option dnsmasq_domain {
          desc "Local domain name"
          type text
}

or you could do it in XML as well ...


The interface than reads these files an generates a user interface (web or
menu driven shell interface).

Any comments.