Re: keyfile plugin initialization and wireless at boot
On Friday 23 of April 2010 02:12:46 Dan Williams wrote: > On Tue, 2010-04-20 at 17:48 +0200, Jirka Klimes wrote: > > I've tried that as well and can confirm a problem. > > > > I rebooted to Ubuntu and added this line to /etc/network/interfaces > > iface eth0 inet dhcp > > That triggers the problem. > > > I looked into it a bit to find the cause. This is what is going on, IMO: > Good diagnosis, though I think what we should do is something like this: > > diff --git a/src/system-settings/nm-sysconfig-settings.c > b/src/system-settings/nm-sysconfig-settings.c index 0054a99..4bcfb04 > 100644 > --- a/src/system-settings/nm-sysconfig-settings.c > +++ b/src/system-settings/nm-sysconfig-settings.c > @@ -357,8 +357,6 @@ add_plugin (NMSysconfigSettings *self, > NMSystemConfigInterface *plugin) > > g_signal_connect (plugin, NM_SYSTEM_CONFIG_INTERFACE_CONNECTION_ADDED, > G_CALLBACK (plugin_connection_added), self); > - g_signal_connect (plugin, > NM_SYSTEM_CONFIG_INTERFACE_UNMANAGED_SPECS_CHANGED, - > G_CALLBACK (unmanaged_specs_changed), self); > g_signal_connect (plugin, "notify::hostname", G_CALLBACK > (hostname_changed), self); > > nm_system_config_interface_init (plugin, NULL); > @@ -368,6 +366,9 @@ add_plugin (NMSysconfigSettings *self, > NMSystemConfigInterface *plugin) NM_SYSTEM_CONFIG_INTERFACE_INFO, &pinfo, > NULL); > > + g_signal_connect (plugin, > NM_SYSTEM_CONFIG_INTERFACE_UNMANAGED_SPECS_CHANGED, + > G_CALLBACK (unmanaged_specs_changed), self); > + > nm_log_info (LOGD_SYS_SET, "Loaded plugin %s: %s", pname, pinfo); > g_free (pname); > g_free (pinfo); > @@ -1328,6 +1329,7 @@ nm_sysconfig_settings_new (const char *config_file, > g_object_unref (self); > return NULL; > } > + unmanaged_specs_changed (NULL, self); > } > > return self; > > can you test and see if that works? If so, feel free to push to git. > > Thanks! > Dan > I've tested and it looks good. Thanks! Commited to master: a4cc8873c9981176575c0939c63473b4206db72c Jirka ___ networkmanager-list mailing list networkmanager-list@gnome.org http://mail.gnome.org/mailman/listinfo/networkmanager-list
Re: keyfile plugin initialization and wireless at boot
On Tue, 2010-04-20 at 17:48 +0200, Jirka Klimes wrote: > I've tried that as well and can confirm a problem. > > I rebooted to Ubuntu and added this line to /etc/network/interfaces > iface eth0 inet dhcp > That triggers the problem. > > I looked into it a bit to find the cause. This is what is going on, IMO: Good diagnosis, though I think what we should do is something like this: diff --git a/src/system-settings/nm-sysconfig-settings.c b/src/system-settings/nm-sysconfig-settings.c index 0054a99..4bcfb04 100644 --- a/src/system-settings/nm-sysconfig-settings.c +++ b/src/system-settings/nm-sysconfig-settings.c @@ -357,8 +357,6 @@ add_plugin (NMSysconfigSettings *self, NMSystemConfigInterface *plugin) g_signal_connect (plugin, NM_SYSTEM_CONFIG_INTERFACE_CONNECTION_ADDED, G_CALLBACK (plugin_connection_added), self); - g_signal_connect (plugin, NM_SYSTEM_CONFIG_INTERFACE_UNMANAGED_SPECS_CHANGED, - G_CALLBACK (unmanaged_specs_changed), self); g_signal_connect (plugin, "notify::hostname", G_CALLBACK (hostname_changed), self); nm_system_config_interface_init (plugin, NULL); @@ -368,6 +366,9 @@ add_plugin (NMSysconfigSettings *self, NMSystemConfigInterface *plugin) NM_SYSTEM_CONFIG_INTERFACE_INFO, &pinfo, NULL); + g_signal_connect (plugin, NM_SYSTEM_CONFIG_INTERFACE_UNMANAGED_SPECS_CHANGED, + G_CALLBACK (unmanaged_specs_changed), self); + nm_log_info (LOGD_SYS_SET, "Loaded plugin %s: %s", pname, pinfo); g_free (pname); g_free (pinfo); @@ -1328,6 +1329,7 @@ nm_sysconfig_settings_new (const char *config_file, g_object_unref (self); return NULL; } + unmanaged_specs_changed (NULL, self); } return self; can you test and see if that works? If so, feel free to push to git. Thanks! Dan > src/system-settings/nm-sysconfig-settings.c:load_plugins() function is used > to > load configured plugins. It adds the plugins to internal list that is used > further in the code; this is done via add_plugin() function. In addition, > add_plugin() funtion calls nm_system_config_interface_init (plugin, NULL) to > initialize the plugin beeing added. > In case of 'ifupdown' SCPluginIfupdown_init (plugin.c) is invoked and it adds > well-known interfaces via udev_device_added(). > Here the working and not working case are forking. Without 'iface eth0 ...', > the function returns (log message: "device added (path: %s, iface: %s): no > ifupdown configuration found."). However with eth0 present in interfaces > file, > g_signal_emit_by_name (G_OBJECT (self), > NM_SYSTEM_CONFIG_INTERFACE_UNMANAGED_SPECS_CHANGED) is called. > That casues NM to invoke > nm_sysconfig_settings_get_unmanaged_specs() and load_connections() in turn > from > src/system-settings/nm-sysconfig-settings.c. > *BUT* in this moment only 'ifupdown' plugin has been loaded. And because > load_connections() is protected via 'connections_loaded' guard, it won't > load > connections from 'keyfile' plugin later when it is added by add_plugin(). > > The attached patch should fix the problem. > Basically, it adds another boolean guard to load_connections() causing that > it loads the connections only after *all* plugins have been loaded. > Nevertheless, not sure if this is the right solution. > > Here is a stack from gdb (it's clearer that my description): > Breakpoint 1, load_connections (self=0x80ef018) at nm-sysconfig-settings.c:133 > 133 NMSysconfigSettingsPrivate *priv = > NM_SYSCONFIG_SETTINGS_GET_PRIVATE (self); > (gdb) bt > #0 load_connections (self=0x80ef018) at nm-sysconfig-settings.c:133 > #1 0x080b94c3 in nm_sysconfig_settings_get_unmanaged_specs (self=0x80ef018) > at > nm-sysconfig-settings.c:248 > #2 0x080bc583 in get_property (object=0x80ef018, prop_id=1, value=0x80de330, > pspec=0x80e0340) at nm-sysconfig-settings.c:1428 > #3 0x003684b8 in g_object_get_property () from /usr/lib/libgobject-2.0.so.0 > #4 0x080b93dc in notify (object=0x80ef018, pspec=0x80e0340) at nm-sysconfig- > settings.c:233 > #5 0x00372118 in g_cclosure_marshal_VOID__PARAM () from > /usr/lib/libgobject-2.0.so.0 > #6 0x003636f9 in ?? () from /usr/lib/libgobject-2.0.so.0 > #7 0x00365072 in g_closure_invoke () from /usr/lib/libgobject-2.0.so.0 > #8 0x0037a0b0 in ?? () from /usr/lib/libgobject-2.0.so.0 > #9 0x0037bb2d in g_signal_emit_valist () from /usr/lib/libgobject-2.0.so.0 > #10 0x0037bfb6 in g_signal_emit () from /usr/lib/libgobject-2.0.so.0 > #11 0x003693e1 in ?? () from /usr/lib/libgobject-2.0.so.0 > #12 0x00365daf in ?? () from /usr/lib/libgobject-2.0.so.0 > #13 0x0036aec3 in g_object_notify () from /usr/lib/libgobject-2.0.so.0 > #14 0x080b9886 in unmanaged_specs_changed (config=0x80f5640, > user_data=0x80ef018) at nm-sysconfig-settings.c:343 > #15 0x003729fc in g_c
Re: keyfile plugin initialization and wireless at boot
On 04/20/2010 07:22 PM, Brian DeRocher wrote: - If you manage to get N-M to start looking at /etc/NetworkManager/system-connections, does "Available to all users" start to work? No, but Casa, my system-connections/ connection shows up. Sweet! I can't edit it. Good! nm-connection-editor can read the system connections now, it's just a matter of editing them. So, regarding my smoke-test suggestion ... - If not ... hmm ... an adventure into D-Bus and PolicyKit may await us. :( Hopefully, this is just a matter of the relevant policy config files not being installed. Try this smoke-test: dbus-send --print-reply --system \ --dest=org.freedesktop.NetworkManagerSystemSettings \ /org/freedesktop/NetworkManagerSettings \ org.freedesktop.NetworkManagerSettings.ListConnections ... never mind. :) See Bill Filler's reply re: PolicyKit. Later, Daniel ___ networkmanager-list mailing list networkmanager-list@gnome.org http://mail.gnome.org/mailman/listinfo/networkmanager-list
Re: keyfile plugin initialization and wireless at boot
On Mon, 2010-04-19 at 22:45 -0400, Daniel Gnoutcheff wrote: > Some more things to try: > > - Could you confirm my observations? I.e. does N-M at least start > looking at /etc/NetworkManager/system-connections after doing one of (1) > removing eth0 related lines from /etc/network/interfaces, (2) setting > "managed=true", or (3) disabling ifupdown? (1) Lots more stuff happened then before. wlan is up, gets IP, works well (2) Lots more stuff happened then before. wlan is up, gets IP, works well (3) Lots more stuff happened then before. wlan is up, gets IP, works well > - If you manage to get N-M to start looking at > /etc/NetworkManager/system-connections, does "Available to all users" > start to work? No, but Casa, my system-connections/ connection shows up. Sweet! I can't edit it. > - If not ... hmm ... an adventure into D-Bus and PolicyKit may await us. > :( Hopefully, this is just a matter of the relevant policy config files > not being installed. Try this smoke-test: >dbus-send --print-reply --system \ > --dest=org.freedesktop.NetworkManagerSystemSettings \ > /org/freedesktop/NetworkManagerSettings \ > org.freedesktop.NetworkManagerSettings.ListConnections I'll investigate later tonight, maybe tomorrow. Thanks all for your help. -- Brian DeRocher ___ networkmanager-list mailing list networkmanager-list@gnome.org http://mail.gnome.org/mailman/listinfo/networkmanager-list
Re: keyfile plugin initialization and wireless at boot
On 04/18/2010 10:34 AM, Brian DeRocher wrote: > Hey everyone, > > I'm trying to get my wireless interface to connect at boot. With > nm-applet "Available to all users" is not enabled and i don't > understand why. This is a Debian unstable system with both PolicyKit > and polkit installed. You have to allow that operation in PolicyKit configuration for it to be enabled on the UI. See the section at the end of http://live.gnome.org/NetworkManagerConfiguration called "Adminstration and Privelege" On Ubuntu the file lives at /usr/share/polkit-1/actions/org.freedesktop.network-manager-settings.system.policy and the action you need to change permissions on is org.freedesktop.network-manager-settings.system.modify > > Deciding to skip Dbus / Polkit and all that mess, i though i could > place a wireless configuration in > /etc/NetworkManager/system-connections/ and it would be loaded at > boot. Some of the forums like Ubuntu and ArchLinux have suggested > this. I tried to follow the settings spec[1] but i'm not sure i got > it right. Using strace ./NetworkManager --no-daemon, i see this > system-connections folder is never read! > > [1] > http://projects.gnome.org/NetworkManager/developers/settings-spec-08.html > > NM just hangs here after entering state 3. I've downloaded the NM > source code version 0.8-1 and began to insert some debugging > statements. Please excuse my debugging. > > lt-NetworkManager: (wlan0): exported as > /org/freedesktop/NetworkManager/Devices/0 > lt-NetworkManager: bcd (wlan0) manager add_device 4 > lt-NetworkManager: bcd (wlan0) manager add_device 5 can assume > connection > lt-NetworkManager: bcd (wlan0) manager add_device 6 can assume > connection > lt-NetworkManager: (wlan0): now managed > lt-NetworkManager: (wlan0): device state change: 1 -> 2 (reason 2) > lt-NetworkManager: (wlan0): bringing up device. > lt-NetworkManager: (wlan0): preparing device. > lt-NetworkManager: (wlan0): deactivating device (reason: 2). > lt-NetworkManager: bcd device-wifi real_is_available 3 false > lt-NetworkManager: bcd device-wifi real_is_available 3 false > lt-NetworkManager: bcd (wlan0) manager add_device 7 > lt-NetworkManager: bcd (wlan0) manager add_device 7 existing 0 > lt-NetworkManager: bcd (wlan0) manager add_device 7 managed 1 > lt-NetworkManager: bcd (wlan0) manager add_device 7 available 0 > lt-NetworkManager: (eth0): carrier is OFF > lt-NetworkManager: bcd (eth0) manager add_device 1 > lt-NetworkManager: (eth0): new Ethernet device (driver: 'r8169') > lt-NetworkManager: (eth0): exported as > /org/freedesktop/NetworkManager/Devices/1 > lt-NetworkManager: bcd (eth0) manager add_device 4 > lt-NetworkManager: bcd (eth0) manager add_device 5 can assume > connection > lt-NetworkManager: bcd (eth0) manager add_device 6 can assume > connection > lt-NetworkManager: bcd (eth0) manager add_device 7 > lt-NetworkManager: bcd (eth0) manager add_device 7 existing 0 > lt-NetworkManager: bcd (eth0) manager add_device 7 managed 0 > lt-NetworkManager: bcd (eth0) manager add_device 7 available 0 > lt-NetworkManager: device_creator(): > /sys/devices/virtual/net/pan0: couldn't determine device driver; > ignoring... > /sbin/ifup: interface lo already configured > lt-NetworkManager: default_adapter_cb(): bluez error getting > default adapter: No such adapter > lt-NetworkManager: (eth0): carrier now ON (device state 1) > lt-NetworkManager: (wlan0): supplicant interface state: > starting -> ready > lt-NetworkManager: bcd device-wifi real_is_available 4 > lt-NetworkManager: bcd device wifi 1 > lt-NetworkManager: (wlan0): device state change: 2 -> 3 > (reason 42) > > I'm still trying to put all the pieces together! It doesn't look like > nm_system_config_interface_init() calls the keyfile plugin init > function NM_SYSTEM_CONFIG_INTERFACE_GET_INTERFACE (config)->init > (config). Can someone explain this? > > lt-NetworkManager: bcd start loading a plugin > lt-NetworkManager: bcd nm_system_config_interface_get_type() > lt-NetworkManager: bcd nm_system_config_interface_init 1 > lt-NetworkManager: bcd nm_system_config_interface_init 2 > (missing init function???) > lt-NetworkManager: bcd nm_system_config_interface_get_type() > lt-NetworkManager: bcd nm_system_config_interface_init 5 > lt-NetworkManager: Loaded plugin keyfile: (c) 2007 - 2008 Red Hat, > Inc. To report bugs please use the NetworkManager mailing list. > > I assume the init function was established in plugin.c here: > > G_DEFINE_TYPE_EXTENDED (SCPluginKeyfile, sc_plugin_keyfile, > G_TYPE_OBJECT, 0, > G_IMPLEMENT_INTERFACE (NM_TYPE_SYSTEM_CONFIG_INTERFACE, > system_config_interface_init)) > > I assume after the init function is called, then read add_connection() > and get_connections() can be called. > > thanks for your help, > Brian > > -- > Brian DeRocher mailto:br...@derocher.org>> > > > ___ > networkmanager-list mailing list >
Re: keyfile plugin initialization and wireless at boot
I've tried that as well and can confirm a problem. I rebooted to Ubuntu and added this line to /etc/network/interfaces iface eth0 inet dhcp That triggers the problem. I looked into it a bit to find the cause. This is what is going on, IMO: src/system-settings/nm-sysconfig-settings.c:load_plugins() function is used to load configured plugins. It adds the plugins to internal list that is used further in the code; this is done via add_plugin() function. In addition, add_plugin() funtion calls nm_system_config_interface_init (plugin, NULL) to initialize the plugin beeing added. In case of 'ifupdown' SCPluginIfupdown_init (plugin.c) is invoked and it adds well-known interfaces via udev_device_added(). Here the working and not working case are forking. Without 'iface eth0 ...', the function returns (log message: "device added (path: %s, iface: %s): no ifupdown configuration found."). However with eth0 present in interfaces file, g_signal_emit_by_name (G_OBJECT (self), NM_SYSTEM_CONFIG_INTERFACE_UNMANAGED_SPECS_CHANGED) is called. That casues NM to invoke nm_sysconfig_settings_get_unmanaged_specs() and load_connections() in turn from src/system-settings/nm-sysconfig-settings.c. *BUT* in this moment only 'ifupdown' plugin has been loaded. And because load_connections() is protected via 'connections_loaded' guard, it won't load connections from 'keyfile' plugin later when it is added by add_plugin(). The attached patch should fix the problem. Basically, it adds another boolean guard to load_connections() causing that it loads the connections only after *all* plugins have been loaded. Nevertheless, not sure if this is the right solution. Here is a stack from gdb (it's clearer that my description): Breakpoint 1, load_connections (self=0x80ef018) at nm-sysconfig-settings.c:133 133 NMSysconfigSettingsPrivate *priv = NM_SYSCONFIG_SETTINGS_GET_PRIVATE (self); (gdb) bt #0 load_connections (self=0x80ef018) at nm-sysconfig-settings.c:133 #1 0x080b94c3 in nm_sysconfig_settings_get_unmanaged_specs (self=0x80ef018) at nm-sysconfig-settings.c:248 #2 0x080bc583 in get_property (object=0x80ef018, prop_id=1, value=0x80de330, pspec=0x80e0340) at nm-sysconfig-settings.c:1428 #3 0x003684b8 in g_object_get_property () from /usr/lib/libgobject-2.0.so.0 #4 0x080b93dc in notify (object=0x80ef018, pspec=0x80e0340) at nm-sysconfig- settings.c:233 #5 0x00372118 in g_cclosure_marshal_VOID__PARAM () from /usr/lib/libgobject-2.0.so.0 #6 0x003636f9 in ?? () from /usr/lib/libgobject-2.0.so.0 #7 0x00365072 in g_closure_invoke () from /usr/lib/libgobject-2.0.so.0 #8 0x0037a0b0 in ?? () from /usr/lib/libgobject-2.0.so.0 #9 0x0037bb2d in g_signal_emit_valist () from /usr/lib/libgobject-2.0.so.0 #10 0x0037bfb6 in g_signal_emit () from /usr/lib/libgobject-2.0.so.0 #11 0x003693e1 in ?? () from /usr/lib/libgobject-2.0.so.0 #12 0x00365daf in ?? () from /usr/lib/libgobject-2.0.so.0 #13 0x0036aec3 in g_object_notify () from /usr/lib/libgobject-2.0.so.0 #14 0x080b9886 in unmanaged_specs_changed (config=0x80f5640, user_data=0x80ef018) at nm-sysconfig-settings.c:343 #15 0x003729fc in g_cclosure_marshal_VOID__VOID () from /usr/lib/libgobject-2.0.so.0 #16 0x00365072 in g_closure_invoke () from /usr/lib/libgobject-2.0.so.0 #17 0x0037a7a8 in ?? () from /usr/lib/libgobject-2.0.so.0 #18 0x0037bb2d in g_signal_emit_valist () from /usr/lib/libgobject-2.0.so.0 #19 0x0037be42 in g_signal_emit_by_name () from /usr/lib/libgobject-2.0.so.0 #20 0x002a5b33 in udev_device_added (self=0x80f5640, device=0x80e0718) at plugin.c:266 #21 0x002a6469 in SCPluginIfupdown_init (config=0x80f5640) at plugin.c:448 #22 0x080bd66b in nm_system_config_interface_init (config=0x80f5640, unused=0x0) at nm-system-config-interface.c:126 #23 0x080b9ab1 in add_plugin (self=0x80ef018, plugin=0x80f5640) at nm- sysconfig-settings.c:374 #24 0x080ba031 in load_plugins (self=0x80ef018, plugins=0x80e1438 "ifupdown,keyfile", error=0xb6f0) at nm-sysconfig-settings.c:481 #25 0x080bc2c1 in nm_sysconfig_settings_new (config_file=0x80df608 "//etc/NetworkManager/nm-system-settings.conf", plugins=0x80e1438 "ifupdown,keyfile", bus=0x80e6b1c, error=0xb6f0) at nm- sysconfig-settings.c:1345 #26 0x0808a77d in nm_manager_get (config_file=0x80df608 "//etc/NetworkManager/nm-system-settings.conf", plugins=0x80e1438 "ifupdown,keyfile", state_file=0x80de700 "//var/lib/NetworkManager/NetworkManager.state", initial_net_enabled=1, initial_wifi_enabled=1, initial_wwan_enabled=1, error=0xb6f0) at nm- manager.c:2957 #27 0x0808359a in main (argc=1, argv=0xb7f4) at main.c:646 As far as "Available to all users" is concerned, I didn't tested that specifically. However I think it was sensitive in my case. Jirka diff --git a/src/system-settings/nm-sysconfig-settings.c b/src/system-settings/nm-sysconfig-settings.c index b120953..b2eda02 100644 --- a/src/system-settings/nm-sysconfig-settings.c +++ b/src/system-settings/nm-sysconfig-settings.c @@ -10
Re: keyfile plugin initialization and wireless at boot
Whoa ... I think I've reproduced at least part of the problem. Yep, we may have a regression on our hands. On my system, /etc/network/interfaces contained only: auto lo iface lo inet loopback But then I decided to edit it to make it mimic your configuration, adding: allow-hotplug eth0 iface eth0 inet dhcp And once I do that, I too see that N-M is no longer reading anything from /etc/NetworkManager/system-connections/, as verified by strace. However, if I replace "managed=false" with "managed=true" in the [ifupdown] section of nm-system-settings.conf, or if I disable the ifupdown plugin altogether, then the problem goes away again. So it looks like when we use ifupdown to ask N-M to keep its hands off of an interface, keyfile gets messed up somehow. However, this doesn't yet explain why "Available to all users" is greyed out. Despite the fact that the system settings service is definitely messed up here, that checkbox is still clickable. It looks like that may be a separate issue. Thanks very much for the report and the info, Brian! Some more things to try: - Could you confirm my observations? I.e. does N-M at least start looking at /etc/NetworkManager/system-connections after doing one of (1) removing eth0 related lines from /etc/network/interfaces, (2) setting "managed=true", or (3) disabling ifupdown? - If you manage to get N-M to start looking at /etc/NetworkManager/system-connections, does "Available to all users" start to work? - If not ... hmm ... an adventure into D-Bus and PolicyKit may await us. :( Hopefully, this is just a matter of the relevant policy config files not being installed. Try this smoke-test: dbus-send --print-reply --system \ --dest=org.freedesktop.NetworkManagerSystemSettings \ /org/freedesktop/NetworkManagerSettings \ org.freedesktop.NetworkManagerSettings.ListConnections Last I heard, the keyfile plugin doesn't do a great job of error reporting, so writing keyfile configs by hand could be a PITA. Getting DBus and PolicyKit to cooperate with us is probably the best approach. Thanks again, and good luck! Later, Daniel ___ networkmanager-list mailing list networkmanager-list@gnome.org http://mail.gnome.org/mailman/listinfo/networkmanager-list
Re: keyfile plugin initialization and wireless at boot
Dan, Thanks for the great tips. It would really be nice if there was a debug message explaining why the "Available to all users" box is disabled. I checked the debian bugs page [1], but there are no bugs reported... yet. [1] http://bugs.debian.org/cgi-bin/pkgreport.cgi?pkg=network-manager-gnome;dist=unstable On Sun, 2010-04-18 at 13:30 -0400, Daniel Gnoutcheff wrote: > On 04/18/2010 10:34 AM, Brian DeRocher wrote: > > Deciding to skip Dbus / Polkit and all that mess, i though i could place > > a wireless configuration in /etc/NetworkManager/system-connections/ and > > it would be loaded at boot. Some of the forums like Ubuntu and ArchLinux > > have suggested this. I tried to follow the settings spec[1] but i'm not > > sure i got it right. Using strace ./NetworkManager --no-daemon, i see > > this system-connections folder is never read! > > Hmm, weird, this all works fine for me on Ubuntu. > Well ... I want to get comfy with this code anyway, so let's see what I > can figure out. > > I'm guessing there's a good chance you've checked this already, but just > to be sure: > > - Are you sure the keyfile plugin is indeed enabled in > /etc/NetworkManager/NetworkManager.conf >or, if that doesn't exist, in > /etc/NetworkManager/nm-system-settings.conf ? Yes, plugins=ifupdown,keyfile. There is no sub-section for [keyfile]. > - You mention compiling N-M from source -- maybe that means you've >ended up with a N-M that reads config info from >/usr/local/etc/NetworkManger/ rather than /etc/NetworkManager/ ? >(Passing --sysconfdir=/etc to ./configure fixes this.) Oh excellent idea, but no. # strace ./NetworkManager --no-daemon 2>&1 | egrep '(Network-manager|nm-system-settings)' open("/etc/NetworkManager/nm-system-settings.conf", O_RDONLY) = 3 open("/etc/NetworkManager/nm-system-settings.conf", O_RDONLY) = 12 open("/etc/NetworkManager/nm-system-settings.conf", O_RDONLY) = 12 > > NM just hangs here after entering state 3. > > Do you mean to say that N-M has actually become unresponsive to D-Bus > calls and the like, or are you just referring to the fact that N-M is > not doing anything? It is normal for N-M to be idle if it doesn't see > any connections to activate (which appears to be our problem). Try > nm-tool, that's a good smoke-test. Sorry for the ambiguity. It is probably not a true hang. I don't know now to speak to it with D-Bus directly, except to use qdbus. > The N-M output you posted, that's not the full output, right? A full, > unabbrevated log would be most helpful for figuring out what's up. You got it... You get the deluxe bcd version ;) Keeping in mind i'm looking add_connection and get_connections. lt-NetworkManager: starting... lt-NetworkManager: modem-manager is now available lt-NetworkManager: bcd nm_sysconfig_settings_new() lt-NetworkManager: bcd nm_system_config_interface_get_type() lt-NetworkManager: bcd (g_iface) nm-system-config-interface interface_init() lt-NetworkManager: bcd (g_iface) nm-system-config-interface interface_init() lt-NetworkManager: bcd nm_system_config_interface_get_type() lt-NetworkManager: bcd nm_system_config_interface_get_type() lt-NetworkManager: bcd start loading a plugin lt-NetworkManager: bcd nm_system_config_interface_get_type() lt-NetworkManager: bcd nm_system_config_interface_init 1 lt-NetworkManager: bcd nm_system_config_interface_init 2 lt-NetworkManager: bcd nm_system_config_interface_get_type() lt-NetworkManager: bcd nm_system_config_interface_init 3 lt-NetworkManager: bcd nm_system_config_interface_get_type() lt-NetworkManager:SCPlugin-Ifupdown: init! lt-NetworkManager:SCPlugin-Ifupdown: update_system_hostname lt-NetworkManager: bcd nm_system_config_interface_get_type() lt-NetworkManager: bcd nm_system_config_interface_get_type() lt-NetworkManager:SCPluginIfupdown: guessed connection type (eth0) = 802-3-ethernet lt-NetworkManager:SCPlugin-Ifupdown: update_connection_setting_from_if_block: name:eth0, type:802-3-ethernet, id:Ifupdown (eth0), uuid: 681b428f-beaf-8932-dce4-687ed5bae28e lt-NetworkManager:SCPlugin-Ifupdown: autoconnect lt-NetworkManager:SCPluginIfupdown: management mode: unmanaged lt-NetworkManager:SCPlugin-Ifupdown: devices added (path: /sys/devices/pci:00/:00:05.0/:08:00.0/net/wlan0, iface: wlan0) lt-NetworkManager:SCPlugin-Ifupdown: device added (path: /sys/devices/pci:00/:00:05.0/:08:00.0/net/wlan0, iface: wlan0): no ifupdown configuration found. lt-NetworkManager:SCPlugin-Ifupdown: devices added (path: /sys/devices/pci:00/:00:06.0/:09:00.0/net/eth0, iface: eth0) lt-NetworkManager:SCPluginIfupdown: locking wired connection setting lt-NetworkManager: bcd nm_system_config_interface_get_type() lt-NetworkManager: bcd nm_system_config_interface_get_type() lt-NetworkManager: bcd nm_system_config_interface_get_type() lt-NetworkManager:Ifupdown: get unmanaged devices count: 1 lt-NetworkManager: bcd l
Re: keyfile plugin initialization and wireless at boot
On 04/18/2010 10:34 AM, Brian DeRocher wrote: Hey everyone, I'm trying to get my wireless interface to connect at boot. With nm-applet "Available to all users" is not enabled and i don't understand why. This is a Debian unstable system with both PolicyKit and polkit installed. Deciding to skip Dbus / Polkit and all that mess, i though i could place a wireless configuration in /etc/NetworkManager/system-connections/ and it would be loaded at boot. Some of the forums like Ubuntu and ArchLinux have suggested this. I tried to follow the settings spec[1] but i'm not sure i got it right. Using strace ./NetworkManager --no-daemon, i see this system-connections folder is never read! Hmm, weird, this all works fine for me on Ubuntu. Well ... I want to get comfy with this code anyway, so let's see what I can figure out. I'm guessing there's a good chance you've checked this already, but just to be sure: - Are you sure the keyfile plugin is indeed enabled in /etc/NetworkManager/NetworkManager.conf or, if that doesn't exist, in /etc/NetworkManager/nm-system-settings.conf ? - You mention compiling N-M from source -- maybe that means you've ended up with a N-M that reads config info from /usr/local/etc/NetworkManger/ rather than /etc/NetworkManager/ ? (Passing --sysconfdir=/etc to ./configure fixes this.) NM just hangs here after entering state 3. Do you mean to say that N-M has actually become unresponsive to D-Bus calls and the like, or are you just referring to the fact that N-M is not doing anything? It is normal for N-M to be idle if it doesn't see any connections to activate (which appears to be our problem). Try nm-tool, that's a good smoke-test. The N-M output you posted, that's not the full output, right? A full, unabbrevated log would be most helpful for figuring out what's up. Good luck! Later, Daniel ___ networkmanager-list mailing list networkmanager-list@gnome.org http://mail.gnome.org/mailman/listinfo/networkmanager-list