Since the same interface could be used for both DHCPv4 and DHCPv6 we
can't just use 'iface' for tracking DHCP client lease changes. Instead
use a generated client ID, and track DHCP events based on the client's
PID instead of interface name.
keys- and route- files weren't passing the should_ignore_file()
check in dir_changed() because should_ignore_file() was only
taking ifcfg- files into account. Generalize most of the ifcfg name
handling functions so that should_ignore_file() will now handle
all three variants.
Add testcases to ensure that the name handling does what we want
it to, and optimize memory usage of utils_get_ifcfg_name() a bit.
NM shouldn't really be calling Enable(False) except in response to
direct user requests to turn off WWAN, much like rfkill, since
Enable(False) /is/ essentially rfkill for 3G. Instead, we should
be powering up the modem before trying to use it, and only
disconnecting after we're done. Let the user do enable/disable
when they want to.
This also fixes issues with other devices like GPS potentially
using the modem-manager at the same time as NM and ensures that NM
won't punch the modem in the face while GPS is using it.
Since openSUSE 11.1 NetworkManager does not support reading yast network
setup. It's for your own good - you either want to use static configuration
(yast) or dynamic (NetworkManager). Mixing the two has never worked very well
and has caused a lot of confusion. The only exception to this is hostname
handling, which is handled by ifcfg-suse plugin.
Since one test read in a file, wrote it out, and read it in again, we
have to be careful of whether srcdir == builddir or not. If it doesn't,
then we need to remove the written-out connection file. If it does, then
we don't want to remove that written-out connection file because it's
tracked by SCM. Avoid the whole problem by writing it out to a separate
directory that we can always delete it from.