[Lunar-commits] <moonbase> lunar-init: Enable wpa_supplicant D-Bus interface when D-Bus is present.

Jannis Pohlmann jannis at lunar-linux.org
Mon Mar 9 03:15:02 CET 2009


commit ad9b2412b3fef07286495a2e0fe80153dcdc7eee
Author: Jannis Pohlmann <jannis at lunar-linux.org>
Date:   Mon Mar 9 03:14:22 2009 +0100

    lunar-init: Enable wpa_supplicant D-Bus interface when D-Bus is present.
---
 utils/lunar-init/network |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/utils/lunar-init/network b/utils/lunar-init/network
index 44263ca..4847c17 100644
--- a/utils/lunar-init/network
+++ b/utils/lunar-init/network
@@ -147,9 +147,14 @@ function device_start()
 			# remove any and all essid
 			$IWCONFIG $1 essid any
 
+			# enable D-Bus control interface if D-Bus is running
+			if [ -x "/etc/init.d/messagebus" ] && [ $(/etc/init.d/messagebus/status) -eq 0 ]; then
+			  WPA_SUPPLICANT_FLAGS="$WPA_SUPPLICANT_FLAGS -u"
+			fi
+
 			# FIXME: Make the config file configurable. 
 			# Also, rely on the configuration to determine whether or not the interface is enabled
-			$WPA_SUPPLICANT -B -w -Dwext -i$1 -c/etc/wpa_supplicant.conf
+			$WPA_SUPPLICANT $WPA_SUPPLICANT_FLAGS -B -w -Dwext -i$1 -c/etc/wpa_supplicant.conf
 
 			# finally start ifplugd
 			if ! $IFPLUGD -c -i $1 &> /dev/null ; then


More information about the Lunar-commits mailing list