|
From: <ok...@ya...> - 2002-02-19 12:55:22
|
I've thought a little about this suggested feature of being able to make a change across multiple hosts and decided how I think it would perhaps be best achieved. I suggested before that I think the config file modifying program should be a separate program[1] which can be invoked from the command-line instead. If we have this, then rsh and ssh would be plenty good enough for connecting to a remote host to run commands. This makes things much more simple and easy and secure. It works well for CVS. And we don't have to reinvent half of ssh and link against SSL, PAM etc. It is sticking to the UNIX philosophy of doing one thing only but doing it well. If you imagine an action such as changing a user (such as with usermod), it would be useful to bring up on screen the user's current details when prompting the user for new details. Also, for some of the fields such as group membership, we would want to provide a list of all possible groups. When making a change across multiple hosts, you would have to contend with this information being different on different machines. It'd make things simpler to just take the information from a single machine (by default the local one). If applying the change on a remote host produces an error, then we have to display the error (shell scripts should be run with the -e (exit on error) option). [1] as an initial rough design for this program, it could have modules for various generic config file styles (such as .ini (e.g smb.conf), .xml, fixed character separated lists (e.g. /etc/passwd), assignment lists (e.g. wgetrc)). The modules would provide an abstract interface to the config file format mapping them into an XML like structure. We could then use something like XSLT matching syntax to specify the changes. So for smb.conf, you might match the [global] section, select the workgroup key and change it's value. Everything else gets copied as-is. For programs with simple config files, we'll perhaps be able to use sed or awk instead of the new command. Initially, it might be better to stick to existing UNIX commands and come to this when we need it. To outline my ideas for the main config tool: There would be a directory structure containing .xml files. So this directory might contain a Networking directory which might include dns.xml routing.xml ppp.xml bind.xml. The directory structure could be more than one level deep. Individual directories and files here could be removed or added. Symbolic links could be used so that for example, NFS configuration might be under both networking and file systems. And as I suggested before an environment variable would list directories to search for these files. Individual .xml files would look a bit like an HTML form but more complex. An input field might specify a shell script which if run would generate a list of possible values. So if you want to delete a print queue, it could generate a list of print queues to prompt you with. When you submit changes, it would again have a shell script to run. m4 preprocessing this shell script would make it possible to make the script minimal and to insert the user-entered values into the script. The distribution could contain a set of these xml files which would be combined with information gleaned from autoconf, and processed with XSLT to produce more platform specific xml files. If the project is successful, applications could distribute their own xml files. You may have already decided on this but I would suggest that everything supports unicode from day one. Unfortunately, I don't know much about it. I'm not too sure that I like the program's name. I tend to prefer natural language words (not necessarily English) to vowel-less acronyms. Another suggestion is that the project is moved from Sourceforge to GNU's Savannah. I'm not 100% happy with the new Sourceforge terms. It'd give us a higher profile with the FSF and improve chances of becoming official GNU. Being officially part of GNU would help a lot in making the project successful (plenty of GNU projects do better than superior alternatives). Oliver __________________________________________________ Do You Yahoo!? Everything you'll ever need on one web page from News and Sport to Email and Music Charts http://uk.my.yahoo.com |