Sascha Silbe wrote: >>> So please mention this possible breakage in /etc/network/interfaces. >> /etc/network/interfaces is not a place for documentation, >> README.Debian is though. > So how about mentioning it in interfaces(5)?
This man page is not part of the network-manager package. >> Besides, it would require to mangle an existing >> /etc/network/interfaces file in >> postinst, which sounds scary at best. > I thought more about newly installed systems than upgrading ones. The > latter could be warned by an entry in the Release Notes instead. > Wouldn't want my /etc/network/interfaces to be touched by a postinst > script. > >> A better way is, to get a fix for [1]. > Of course that's the better way. It's just not going to happen for > lenny, if at all (upstream seems quite reluctant). The idea is, that if NM finds an interface, which it doesn't manage, that instead of reporting offline for that interface, it always reports online. This is obviously a bit of a crude hack. The advantage over the current situation would be though, that it wouldn't be a regression to old ifupdown behaviour. Apps would simply try to establish a network connection and time out. There is a patch floating around for NM 0.6 in one of the older Ubuntu releases, which I could reuse (attached for reference). Care to test this patch and give me your feedback? Cheers, Michael -- Why is it that all of the instruments seeking intelligent life in the universe are pointed away from Earth?
diff -Nur bzr.debian.0.9.5/src/NetworkManagerDbus.c bzr.debian.0.9.5.new/src/NetworkManagerDbus.c --- bzr.debian.0.9.5/src/NetworkManagerDbus.c 2007-06-25 17:38:42.000000000 +0200 +++ bzr.debian.0.9.5.new/src/NetworkManagerDbus.c 2007-06-25 17:38:42.000000000 +0200 @@ -302,6 +302,9 @@ if (data->asleep == TRUE) return NM_STATE_ASLEEP; + if (data->always_online == TRUE) + return NM_STATE_CONNECTED; + act_dev = nm_get_active_device (data); if (!act_dev && !data->modem_active) return NM_STATE_DISCONNECTED; diff -Nur bzr.debian.0.9.5/src/NetworkManagerMain.h bzr.debian.0.9.5.new/src/NetworkManagerMain.h --- bzr.debian.0.9.5/src/NetworkManagerMain.h 2007-06-25 17:18:17.000000000 +0200 +++ bzr.debian.0.9.5.new/src/NetworkManagerMain.h 2007-06-25 17:38:42.000000000 +0200 @@ -86,6 +86,7 @@ gboolean modem_active; gboolean asleep; gboolean disconnected; + gboolean always_online; GSList * dialup_list; GMutex * dialup_list_mutex; diff -Nur bzr.debian.0.9.5/src/nm-device.c bzr.debian.0.9.5.new/src/nm-device.c --- bzr.debian.0.9.5/src/nm-device.c 2007-06-25 17:38:42.000000000 +0200 +++ bzr.debian.0.9.5.new/src/nm-device.c 2007-06-25 17:38:42.000000000 +0200 @@ -195,6 +195,8 @@ /* Allow distributions to flag devices as disabled */ if (nm_system_device_get_disabled (dev)) { + /* In this case, we assume we're always online */ + app_data->always_online = TRUE; g_object_unref (G_OBJECT (dev)); return NULL; }
signature.asc
Description: OpenPGP digital signature