On Wed, 2004-09-15 at 13:06, Dan Williams wrote:
On Wed, 2004-09-15 at 12:09 -0400, Owen Taylor wrote:
> So, you might want to look at it as "backup only when on these
> networks". I think it's pretty reasonable to assume that people
> have lots of bandwidth at home and at work these days.
Which presents the question, is there any attributes that NetworkManager
can expose about the network that would help this? Time connected so
far attribute (though that wouldn't really tell you anything about what
the user might do 5 seconds from now when they pull the plug and walk
out of the coffee shop)?
NetworkManager doesn't have a concept of profiles, since that was a
specific exclusion from the beginning (profiles suck). I'm not quite
sure how to go about a "backup only when on these networks", except
perhaps for these two ideas:
I don't have a good answer to this, but I do think the concept of
a "network" corresponds to a fairly definite idea in the user's
head, so it at least potentially something that we can expose
in the user interface. And "Do A only on network B" may be something
we need more of in the future.
1) on wired networks, use your hostname as returned via DHCP, match
that
against a "home network" sort of thing. But remember, NetworkManager
keeps the hostname of the actual machine constant (because otherwise X
falls over and dies), so NM would save the hostname right before setting
it back and expose that via DBus
The hostname that dhcp returns should be the same as a reverse DNS
lookup on the network address, right?
2) On wireless networks, we could key off of the ESSID of the base
station to figure out whether you were on a "home" network or not.
3) other, more complicated ways?
The best idea that comes to my mind is:
- Use a restrictive criterion like MAC address of the router
that seldom gives false positives for "am on the same network"
- Then have a "bookmark this network" function to give a name
to the current network; if the hardware changes or some such,
then the user will have to rebookmark the network, which is
a little annoying, but managable.
We could also try to establish a "Fedora" way to authoritatively
identify and name networks so that network administrators who
cared could do better. (Extra bit of information from DHCP,
extra DNS records, whatever.)
Generally, networks probably correspond pretty closely to
domains for sufficiently well administered networks... e.g., my
current network is "boston.redhat.com", but I don't think you
want to rely on that congruence.
Regards,
Owen