keyfile plugin initialization and wireless at boot



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!

[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: <info>  (wlan0): exported as /org/freedesktop/NetworkManager/Devices/0
lt-NetworkManager: <info>  bcd (wlan0) manager add_device 4
lt-NetworkManager: <info>  bcd (wlan0) manager add_device 5 can assume connection
lt-NetworkManager: <info>  bcd (wlan0) manager add_device 6 can assume connection
lt-NetworkManager: <info>  (wlan0): now managed
lt-NetworkManager: <info>  (wlan0): device state change: 1 -> 2 (reason 2)
lt-NetworkManager: <info>  (wlan0): bringing up device.
lt-NetworkManager: <info>  (wlan0): preparing device.
lt-NetworkManager: <info>  (wlan0): deactivating device (reason: 2).
lt-NetworkManager: <info>  bcd device-wifi real_is_available 3 false
lt-NetworkManager: <info>  bcd device-wifi real_is_available 3 false
lt-NetworkManager: <info>  bcd (wlan0) manager add_device 7
lt-NetworkManager: <info>  bcd (wlan0) manager add_device 7 existing 0
lt-NetworkManager: <info>  bcd (wlan0) manager add_device 7 managed 1
lt-NetworkManager: <info>  bcd (wlan0) manager add_device 7 available 0
lt-NetworkManager: <info>  (eth0): carrier is OFF
lt-NetworkManager: <info>  bcd (eth0) manager add_device 1
lt-NetworkManager: <info>  (eth0): new Ethernet device (driver: 'r8169')
lt-NetworkManager: <info>  (eth0): exported as /org/freedesktop/NetworkManager/Devices/1
lt-NetworkManager: <info>  bcd (eth0) manager add_device 4
lt-NetworkManager: <info>  bcd (eth0) manager add_device 5 can assume connection
lt-NetworkManager: <info>  bcd (eth0) manager add_device 6 can assume connection
lt-NetworkManager: <info>  bcd (eth0) manager add_device 7
lt-NetworkManager: <info>  bcd (eth0) manager add_device 7 existing 0
lt-NetworkManager: <info>  bcd (eth0) manager add_device 7 managed 0
lt-NetworkManager: <info>  bcd (eth0) manager add_device 7 available 0
lt-NetworkManager: <WARN>  device_creator(): /sys/devices/virtual/net/pan0: couldn't determine device driver; ignoring...
/sbin/ifup: interface lo already configured
lt-NetworkManager: <WARN>  default_adapter_cb(): bluez error getting default adapter: No such adapter
lt-NetworkManager: <info>  (eth0): carrier now ON (device state 1)
lt-NetworkManager: <info>  (wlan0): supplicant interface state:  starting -> ready
lt-NetworkManager: <info>  bcd device-wifi real_is_available 4
lt-NetworkManager: <info>  bcd device wifi 1
lt-NetworkManager: <info>  (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 <brian derocher org>


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]