OTOH you did give me another idea: The one with leaving out the ftp_instances variable, and just getting the user to give information for each ftp instance. I can create the value of ftp_instances dynamically, the IDs too, since they just need to be unique.
Another way to do it would be to have variables with a list of values for each ftp_instance variable, but I think that's uglier:
(and less usable)hostnames=one,two,three sourcepaths=/path/one,/path/two,/path/three
As for your other concerns, the variables can't contain newlines, the split only splits on the first '=' and variable names cant contain an '=' or a space. (These are unix environment vars, so I'd be quite surprised if that even worked, the config files contain mostly a bunch of "export VAR=X", anyway, even if it was possible, this software doesn't have any).
These won't be idiots, that will be running this, after all, they usually install the software by editing all of it's config files, and getting them lined up with each other. I'm just trying to make the process easier, without making it more complex in the process.
Duplicating data is not a bad thing, if it provides more clarity.. IMO
C.
In reply to Re^2: Configuration file design
by castaway
in thread Configuration file design
by castaway
For: | Use: | ||
& | & | ||
< | < | ||
> | > | ||
[ | [ | ||
] | ] |