1
0
mirror of https://github.com/gryf/wicd.git synced 2026-01-08 14:54:15 +01:00

Merge r398 of mainline 1.6.

This commit is contained in:
Andrew Psaltis
2009-05-19 21:06:38 -04:00
4 changed files with 17 additions and 12 deletions

View File

@@ -1138,7 +1138,7 @@ is already active.</property>
</widget>
<packing>
<property name="expand">False</property>
<property name="position">1</property>
<property name="position">3</property>
</packing>
</child>
<child>
@@ -1153,7 +1153,7 @@ is already active.</property>
</widget>
<packing>
<property name="expand">False</property>
<property name="position">2</property>
<property name="position">1</property>
</packing>
</child>
<child>
@@ -1168,7 +1168,7 @@ is already active.</property>
</widget>
<packing>
<property name="expand">False</property>
<property name="position">3</property>
<property name="position">2</property>
</packing>
</child>
</widget>

View File

@@ -1,6 +1,5 @@
[Desktop Entry]
Categories=Application;Network;
Encoding=UTF-8
Exec=wicd-client
GenericName=Network Manager
Icon=wicd-client

View File

@@ -86,6 +86,8 @@ class configure(Command):
('initfilename=', None, "set the name of the init file (don't use)"),
('wicdgroup=', None, "set the name of the group used for wicd"),
('distro=', None, 'set the distribution for which wicd will be installed'),
('loggroup=', None, 'the group the log file belongs to'),
('logperms=', None, 'the log file permissions'),
# Configure switches
('no-install-init', None, "do not install the init file"),
@@ -220,6 +222,8 @@ class configure(Command):
self.pidfile = '/var/run/wicd/wicd.pid'
self.initfilename = os.path.basename(self.initfile)
self.wicdgroup = 'users'
self.loggroup = ''
self.logperms = '0600'
def distro_check(self):
print "Distro is: "+self.distro
@@ -236,6 +240,7 @@ class configure(Command):
self.mandir = '/usr/man/'
self.no_install_acpi = True
elif self.distro in ['debian']:
self.wicdgroup = "netdev"
self.init = '/etc/init.d/'
self.initfile = 'init/debian/wicd'
elif self.distro in ['arch']:

View File

@@ -121,8 +121,9 @@ def GetWirelessInterfaces():
def GetWiredInterfaces():
""" Returns a list of wired interfaces on the system. """
basedir = '/sys/class/net/'
return [iface for iface in os.listdir(basedir) if not 'wireless'
in os.listdir(basedir + iface) and
return [iface for iface in os.listdir(basedir)
if os.path.isdir(basedir + iface) and not 'wireless'
in os.listdir(basedir + iface) and
open(basedir + iface + "/type").readlines()[0].strip() == "1"]
def NeedsExternalCalls():
@@ -213,17 +214,17 @@ class BaseInterface(object):
"""
def get_client_name(cl):
""" Converts the integer value for a dhcp client to a string. """
if self.dhclient_cmd and cl in [misc.DHCLIENT, misc.AUTO]:
client = "dhclient"
cmd = self.dhclient_cmd
if self.dhclient_needs_verbose:
cmd += ' -v'
elif self.dhcpcd_cmd and cl in [misc.DHCPCD, misc.AUTO]:
if self.dhcpcd_cmd and cl in [misc.DHCPCD, misc.AUTO]:
client = "dhcpcd"
cmd = self.dhcpcd_cmd
elif self.pump_cmd and cl in [misc.PUMP, misc.AUTO]:
client = "pump"
cmd = self.pump_cmd
elif self.dhclient_cmd and cl in [misc.DHCLIENT, misc.AUTO]:
client = "dhclient"
cmd = self.dhclient_cmd
if self.dhclient_needs_verbose:
cmd += ' -v'
else:
client = None
cmd = ""