1
0
mirror of https://github.com/gryf/wicd.git synced 2025-12-19 12:28:08 +01:00

Added distro-specific init scripts based on those used by NM (these are very experimental and likely broken in many cases).

Updated setup.py to pick which initscript to install based on the distro detected.
Updated MANIFEST.in to make sure launchdaemon.sh is included in the sdist build.
Fixed a bunch of crash bugs in tool detection system when tools are detected.
Made tool detection work correctly when "which" returns output if no match is found (as opposed to no output).  Eventually we might want to hardcode possible paths instead of using which at all...
Fixed some message formatting in the daemon.
Added some docstrings.
Added a pidfile system for increased initscript compatibility (sort of, it's somewhat incomplete).
This commit is contained in:
imdano
2008-03-24 00:03:35 +00:00
parent c055ea0d36
commit ef9b5cc7f3
18 changed files with 567 additions and 188 deletions

166
setup.py
View File

@@ -16,6 +16,78 @@
#
from distutils.core import setup
import os
data=[
('/etc/acpi/resume.d', ['other/80-wicd-connect.sh']),
('/etc/dbus-1/system.d', ['other/wicd.conf']),
('/etc/acpi/suspend.d', ['other/50-wicd-suspend.sh']),
('/usr/share/applications', ['other/hammer-00186ddbac.desktop']),
('', ['launchdaemon.sh']),
('/usr/share/pixmaps', ['other/wicd.png']),
('images', ['images/good-signal.png', 'images/low-signal.png',
'images/no-signal.png', 'images/good-signal-lock.png' ,'images/wired.png',
'images/wicd-purple.png', 'images/signal-25.png', 'images/signal-50.png',
'images/wicd-green.png', 'images/signal-100.png', 'images/wicd.png',
'images/low-signal-lock.png', 'images/wicd-blue.png', 'images/bad-signal.png',
'images/bad-signal-lock.png', 'images/wicd-orange.png', 'images/signal-75.png',
'images/high-signal.png', 'images/wicd-red.png', 'images/high-signal-lock.png']),
('encryption/templates', ['encryption/templates/peap', 'encryption/templates/wep-hex', 'encryption/templates/wpa',
'encryption/templates/wep-passphrase', 'encryption/templates/wep-shared',
'encryption/templates/ttls', 'encryption/templates/leap', 'encryption/templates/peap-tkip',
'encryption/templates/eap', 'encryption/templates/active']),
('data', ['data/wicd.png', 'data/wicd.glade']),
('translations', ['translations/wicd.pot', 'translations/ids']),
('translations/de_DE/LC_MESSAGES', ['translations/de_DE/LC_MESSAGES/wicd.mo']),
('translations/zh_HK/LC_MESSAGES', ['translations/zh_HK/LC_MESSAGES/wicd.mo']),
('translations/fr_FR/LC_MESSAGES', ['translations/fr_FR/LC_MESSAGES/wicd.mo']),
('translations/ca_ES/LC_MESSAGES', ['translations/ca_ES/LC_MESSAGES/wicd.mo']),
('translations/ko_KR/LC_MESSAGES', ['translations/ko_KR/LC_MESSAGES/wicd.mo']),
('translations/gl_GL/LC_MESSAGES', ['translations/gl_GL/LC_MESSAGES/wicd.mo']),
('translations/no_NO/LC_MESSAGES', ['translations/no_NO/LC_MESSAGES/wicd.mo']),
('translations/bg_PHO/LC_MESSAGES', ['translations/bg_PHO/LC_MESSAGES/wicd.mo']),
('translations/po', ['translations/po/bg_PHO.po', 'translations/po/ja_JA.po', 'translations/po/de_DE.po',
'translations/po/de_DE.po', 'translations/po/zh_CN.po', 'translations/po/fr_FR.po',
'translations/po/ar_EG.po', 'translations/po/it_IT.po', 'translations/po/fi_FI.po',
'translations/po/sl_SI.po', 'translations/po/es_ES.po', 'translations/po/da_DK.po',
'translations/po/sv_SE.po', 'translations/po/ca_ES.po', 'translations/po/nl_NL.po',
'translations/po/no_NO.po', 'translations/po/gl_GL.po', 'translations/po/pl_PL.po',
'translations/po/ru_RU.po', 'translations/po/en_US.po', 'translations/po/pt_BR.po',
'translations/po/cs_CZ.po', 'translations/po/tr_TR.po', 'translations/po/zh_HK.po',
'translations/po/hu_HU.po', 'translations/po/ko_KR.po']),
('translations/sl_SI/LC_MESSAGES', ['translations/sl_SI/LC_MESSAGES/wicd.mo']),
('translations/da_DK/LC_MESSAGES', ['translations/da_DK/LC_MESSAGES/wicd.mo']),
('translations/ja_JA/LC_MESSAGES', ['translations/ja_JA/LC_MESSAGES/wicd.mo']),
('translations/zh_CN/LC_MESSAGES', ['translations/zh_CN/LC_MESSAGES/wicd.mo']),
('translations/ru_RU/LC_MESSAGES', ['translations/ru_RU/LC_MESSAGES/wicd.mo']),
('translations/it_IT/LC_MESSAGES', ['translations/it_IT/LC_MESSAGES/wicd.mo']),
('translations/es_ES/LC_MESSAGES', ['translations/es_ES/LC_MESSAGES/wicd.mo']),
('translations/pt_BR/LC_MESSAGES', ['translations/pt_BR/LC_MESSAGES/wicd.mo']),
('translations/cs_CZ/LC_MESSAGES', ['translations/cs_CZ/LC_MESSAGES/wicd.mo']),
('translations/sv_SE/LC_MESSAGES', ['translations/sv_SE/LC_MESSAGES/wicd.mo']),
('translations/ar_EG/LC_MESSAGES', ['translations/ar_EG/LC_MESSAGES/wicd.mo']),
('translations/tr_TR/LC_MESSAGES', ['translations/tr_TR/LC_MESSAGES/wicd.mo']),
('translations/en_US/LC_MESSAGES', ['translations/en_US/LC_MESSAGES/wicd.mo']),
('translations/fi_FI/LC_MESSAGES', ['translations/fi_FI/LC_MESSAGES/wicd.mo']),
('translations/pl_PL/LC_MESSAGES', ['translations/pl_PL/LC_MESSAGES/wicd.mo']),
('translations/hu_HU/LC_MESSAGES', ['translations/hu_HU/LC_MESSAGES/wicd.mo']),
('translations/nl_NL/LC_MESSAGES', ['translations/nl_NL/LC_MESSAGES/wicd.mo'])]
if os.access('/etc/redhat-release', os.F_OK):
data.append(('/etc/rc.d/init.d', ['other/initscripts/redhat/wicd']))
elif os.access('/etc/SuSE-release', os.F_OK):
data.append(('/etc/init.d', ['other/initscripts/debian/wicd']))
elif os.access('/etc/fedora-release', os.F_OK):
data.append(('/etc/rc.d/init.d', ['other/initscripts/redhat/wicd']))
elif os.access('/etc/gentoo-release', os.F_OK):
data.append(('/etc/init.d', ['other/initscripts/gentoo/wicd']))
elif os.access('/etc/debian-release', os.F_OK):
data.append(('/etc/init.d', ['other/initscripts/debian/wicd']))
elif os.access('/etc/arch-release', os.F_OK):
data.append(('/etc/rc.d', ['other/initscripts/arch/wicd']))
elif os.access('/etc/slackware-release', os.F_OK):
data.append(('/etc/rc.d', ['other/initscripts/slackware/wicd']))
setup(name="Wicd",
version="1.5.0",
@@ -34,97 +106,5 @@ connect at startup to any preferred network within range.
license="http://www.gnu.org/licenses/old-licenses/gpl-2.0.html",
scripts=['configscript.py', 'autoconnect.py', 'gui.py', 'wicd.py', 'daemon.py', 'suspend.py', 'monitor.py'],
py_modules=['networking', 'misc', 'wnettools', 'wpath'],
data_files=[
('/etc/init.d', ['other/wicd']),
('/etc/acpi/resume.d', ['other/80-wicd-connect.sh']),
('/etc/dbus-1/system.d', ['other/wicd.conf']),
('/etc/acpi/suspend.d', ['other/50-wicd-suspend.sh']),
('/usr/share/applications', ['other/hammer-00186ddbac.desktop']),
('', ['launchdaemon.sh']),
('/usr/share/pixmaps', ['other/wicd.png']),
('images', ['images/good-signal.png']),
('images', ['images/low-signal.png']),
('images', ['images/no-signal.png']),
('images', ['images/good-signal-lock.png']),
('images', ['images/wired.png']),
('images', ['images/wicd-purple.png']),
('images', ['images/signal-25.png']),
('images', ['images/signal-50.png']),
('images', ['images/wicd-green.png']),
('images', ['images/signal-100.png']),
('images', ['images/wicd.png']),
('images', ['images/low-signal-lock.png']),
('images', ['images/wicd-blue.png']),
('images', ['images/bad-signal.png']),
('images', ['images/bad-signal-lock.png']),
('images', ['images/wicd-orange.png']),
('images', ['images/signal-75.png']),
('images', ['images/high-signal.png']),
('images', ['images/wicd-red.png']),
('images', ['images/high-signal-lock.png']),
('encryption/templates', ['encryption/templates/peap']),
('encryption/templates', ['encryption/templates/wep-hex']),
('encryption/templates', ['encryption/templates/wpa']),
('encryption/templates', ['encryption/templates/wep-passphrase']),
('encryption/templates', ['encryption/templates/wep-shared']),
('encryption/templates', ['encryption/templates/ttls']),
('encryption/templates', ['encryption/templates/leap']),
('encryption/templates', ['encryption/templates/peap-tkip']),
('encryption/templates', ['encryption/templates/eap']),
('encryption/templates', ['encryption/templates/active']),
('data', ['data/wicd.png']),
('data', ['data/wicd.glade']),
('translations', ['translations/wicd.pot']),
('translations', ['translations/ids']),
('translations/de_DE/LC_MESSAGES', ['translations/de_DE/LC_MESSAGES/wicd.mo']),
('translations/zh_HK/LC_MESSAGES', ['translations/zh_HK/LC_MESSAGES/wicd.mo']),
('translations/fr_FR/LC_MESSAGES', ['translations/fr_FR/LC_MESSAGES/wicd.mo']),
('translations/ca_ES/LC_MESSAGES', ['translations/ca_ES/LC_MESSAGES/wicd.mo']),
('translations/ko_KR/LC_MESSAGES', ['translations/ko_KR/LC_MESSAGES/wicd.mo']),
('translations/gl_GL/LC_MESSAGES', ['translations/gl_GL/LC_MESSAGES/wicd.mo']),
('translations/no_NO/LC_MESSAGES', ['translations/no_NO/LC_MESSAGES/wicd.mo']),
('translations/bg_PHO/LC_MESSAGES', ['translations/bg_PHO/LC_MESSAGES/wicd.mo']),
('translations/po', ['translations/po/bg_PHO.po']),
('translations/po', ['translations/po/ja_JA.po']),
('translations/po', ['translations/po/de_DE.po']),
('translations/po', ['translations/po/zh_CN.po']),
('translations/po', ['translations/po/fr_FR.po']),
('translations/po', ['translations/po/ar_EG.po']),
('translations/po', ['translations/po/it_IT.po']),
('translations/po', ['translations/po/fi_FI.po']),
('translations/po', ['translations/po/sl_SI.po']),
('translations/po', ['translations/po/es_ES.po']),
('translations/po', ['translations/po/da_DK.po']),
('translations/po', ['translations/po/sv_SE.po']),
('translations/po', ['translations/po/ca_ES.po']),
('translations/po', ['translations/po/nl_NL.po']),
('translations/po', ['translations/po/no_NO.po']),
('translations/po', ['translations/po/gl_GL.po']),
('translations/po', ['translations/po/pl_PL.po']),
('translations/po', ['translations/po/ru_RU.po']),
('translations/po', ['translations/po/en_US.po']),
('translations/po', ['translations/po/pt_BR.po']),
('translations/po', ['translations/po/cs_CZ.po']),
('translations/po', ['translations/po/tr_TR.po']),
('translations/po', ['translations/po/zh_HK.po']),
('translations/po', ['translations/po/hu_HU.po']),
('translations/po', ['translations/po/ko_KR.po']),
('translations/sl_SI/LC_MESSAGES', ['translations/sl_SI/LC_MESSAGES/wicd.mo']),
('translations/da_DK/LC_MESSAGES', ['translations/da_DK/LC_MESSAGES/wicd.mo']),
('translations/ja_JA/LC_MESSAGES', ['translations/ja_JA/LC_MESSAGES/wicd.mo']),
('translations/zh_CN/LC_MESSAGES', ['translations/zh_CN/LC_MESSAGES/wicd.mo']),
('translations/ru_RU/LC_MESSAGES', ['translations/ru_RU/LC_MESSAGES/wicd.mo']),
('translations/it_IT/LC_MESSAGES', ['translations/it_IT/LC_MESSAGES/wicd.mo']),
('translations/es_ES/LC_MESSAGES', ['translations/es_ES/LC_MESSAGES/wicd.mo']),
('translations/pt_BR/LC_MESSAGES', ['translations/pt_BR/LC_MESSAGES/wicd.mo']),
('translations/cs_CZ/LC_MESSAGES', ['translations/cs_CZ/LC_MESSAGES/wicd.mo']),
('translations/sv_SE/LC_MESSAGES', ['translations/sv_SE/LC_MESSAGES/wicd.mo']),
('translations/ar_EG/LC_MESSAGES', ['translations/ar_EG/LC_MESSAGES/wicd.mo']),
('translations/tr_TR/LC_MESSAGES', ['translations/tr_TR/LC_MESSAGES/wicd.mo']),
('translations/en_US/LC_MESSAGES', ['translations/en_US/LC_MESSAGES/wicd.mo']),
('translations/fi_FI/LC_MESSAGES', ['translations/fi_FI/LC_MESSAGES/wicd.mo']),
('translations/pl_PL/LC_MESSAGES', ['translations/pl_PL/LC_MESSAGES/wicd.mo']),
('translations/hu_HU/LC_MESSAGES', ['translations/hu_HU/LC_MESSAGES/wicd.mo']),
('translations/nl_NL/LC_MESSAGES', ['translations/nl_NL/LC_MESSAGES/wicd.mo'])
]
data_files=data
)