James schrieb:
one-to-many, multi support is included.
I'll have a closer look then :)
I designed these so they were clear and easy to work with. Documentation needs a bit of work, but making changes anywhere is very simple. And more approachable than C. Not sure how it's 'unsafe'
I'll also have a closer look at that. By 'unsafe' I meant the scope gotchas you mention below, as well as error handling: if you do something wrong, there will be no "parse error" message, but just weird things happening. And - of course - if a third party has rights to change config files, they could exploit that easily.
The bash is fairly simple and readable too though.
Sometimes it is, but network configuration can become rather complex.
Is there such a demand though? Arch has always tended away from GUI tools. I'd rather not switch to a C implementation, just so we can make writing GUI's easier.
There is a demand. People want to configure their wireless when they change their location, they want to configure their network when they plug a cable in and so on. Arch is design to not depend on GUI tools, but having them does not hurt. With a bash netcfg, we need to invoke it and parse the output everytime we change something, or simply reimplement its functionality. That is not good for a GUI.
And that's the state of many Arch projects. Arch has needed these scripts for *ages* and nobody else has had any interest. There is a need though, every day, there's still multiple new threads on the forums with wireless and other networking problems. And simply, the current scripts do not cater nicely towards > 1 network per interface.
You can write C based scripts, but unless you knuckle down and work on them, I doubt we'll see them before the end of the year. If they do appear, they won't have reached the stage of the bash scripts before us.
This is the problem we have, ideas are raised, but we don't have enough implementers.
You are absolutely right about that. It is great that you spent so much time on the scripts and I hope they work great. As I said, I added this item for general discussion and my efforts are only experimental.
I think getting too complex with configuration tools is not the best idea. I do, however agree that the profile-to-interface mapping should be a one-to-many mapping.
one-to-many available in these.
That is great. IMO, the disadvantage here is that we need several configuration files for them (that is the approach I made when I hacked with your original scripts, but got lost in bash scope stuff). Do you know a cool bash-parsable configuration file layout where we could put them into one file?
Also, if bash is unsafe, we need to rewrite rc.conf, makepkg, and probably a hundred other utilities. Dan and I might be willing to accept patches for a binary makepkg, so feel free.
Aye, so many of arch's scripts are written in bash. These network scripts as they're implemented, are simpler and tidier than many other things i've seen come out of Arch...
I wanted to try something different to be able to put more configuration into one file and still stay readable. If you say that the network scripts are nicely implemented, then I believe you and will indeed look at them more carefully tonight (I was just too tired yesterday, so I added my thoughts and didn't read the latest version of the scripts).
However..... we could make a compromise, a halfway.
If we could design a better config file, and then write a C(++) based program to parse this file and spit out requested variables, then we could have a tidier and better implementation in many aspects. We could keep the simplicity of the bash scripts, and allow the extra power of a better config file.
That would be worth looking into.