Network Profiles development
From ArchWiki
Contents |
netcfg v2.2 development
- Large scale cleanup and re-organisation
- Implemented more reliable wireless support with wpa_supplicant via dbus (CONNECTION="wireless-dbus"). Although currently it's pretty poor.
- Converted from net-tools to iproute2 (CONNECTION="ethernet-iproute")
Migration
Addon CONNECTION types
Connection types function differently now. Rather than being sourced in, they are now a script of their own. This is for two reasons:
- Sourcing configs created issues with variables being set, and required the clumsy "clean scope" functions to unset them.
- Connection scripts in other programming languages
As connection scripts are now executable scripts of their own, they accept the following arguments. I'll use the wireless script as an example.
- /usr/lib/network/connections/wireless start <profilename>
- /usr/lib/network/connections/wireless stop <profilename>
Internally, it is up to the script to accept these two arguments, load the profile and do what it needs to do.
GUI Authors/frontends
Syntax for the configuration files remains the same. Documentation is now in the git repository listing the _supported_ options.
In 2.2 there are two new connection types that I encourage you to support.
- ethernet-iproute. Provides and entirely new set of options to configure ip/dhcp. The options used are new and different to the previous "ethernet"
- wireless-dbus: Uses dbus+wpa_supplicant to connect to wireless. It uses nearly identical options to the old "wireless" connection method, except it uses ethernet-iproute instead of ethernet for setting an IP.
Git
The netcfg git can be found at http://projects.archlinux.org/?p=netcfg.git;a=summary
To gain a copy of the git repository, run:
git clone http://projects.archlinux.org/netcfg.git
Submitting Patches
Submitting a good set of patches, is really really easy. This makes my life easier as I can merge things quicker and thus more releases. Try to separate different/unrelated changes into different commits, though a little overlap doesn't matter.
Example Workflow
- Clone repository
git clone http://projects.archlinux.org/netcfg.git
- Make changes, and commit with useful commit messages
- Submit patch
git-format-patch origin..master