summaryrefslogtreecommitdiffstats
path: root/src-wireless/wireless-dbus
diff options
context:
space:
mode:
authorJames Rayner <james@archlinux.org>2009-02-17 02:29:01 +0100
committerJames Rayner <james@archlinux.org>2009-02-17 02:29:01 +0100
commit9692fac721339ce22b5b46e382589587e3e01d78 (patch)
tree55c5d8fa300769f3744a888c8ae536753b94df76 /src-wireless/wireless-dbus
parent5955232eeb8e5d55d9c41c8bc60d058ebbc2ded9 (diff)
downloadnetctl-9692fac721339ce22b5b46e382589587e3e01d78.tar.gz
netctl-9692fac721339ce22b5b46e382589587e3e01d78.tar.xz
Improve tolerance of wireless-dbus and remove hardcoded values
Diffstat (limited to 'src-wireless/wireless-dbus')
-rwxr-xr-xsrc-wireless/wireless-dbus9
1 files changed, 4 insertions, 5 deletions
diff --git a/src-wireless/wireless-dbus b/src-wireless/wireless-dbus
index d954577..bdbb3fb 100755
--- a/src-wireless/wireless-dbus
+++ b/src-wireless/wireless-dbus
@@ -22,9 +22,8 @@ def read_config(config):
options = {}
for line in cfg:
(var, delim, value) = line.partition('=')
- if not delim:
- raise SyntaxError, 'Bad configuration file'
- options[var] = value
+ if delim and var.lstrip()[0] != "#":
+ options[var] = value
return options
def start(profile):
@@ -78,9 +77,9 @@ def start(profile):
driver="wext"
try:
- path = wpas.getInterface("ipw0")
+ path = wpas.getInterface(profile["INTERFACE"])
except dbus.exceptions.DBusException:
- path = wpas.addInterface("ipw0", {"driver":dbus.String(driver,variant_level=1)})
+ path = wpas.addInterface(profile["INTERFACE"], {"driver":dbus.String(driver,variant_level=1)})
# Get interface object
if_obj = bus.get_object(WPAS_DBUS_SERVICE, path)