1
0
mirror of https://github.com/gryf/wicd.git synced 2026-01-02 20:04:16 +01:00

Fix running scripts

Fix broken symlink
Update slackware init script
Add new build options to wpath.py
This commit is contained in:
Dan O'Reilly
2008-12-11 00:29:00 -05:00
parent faf60f6ed3
commit e3c70de4f5
7 changed files with 22 additions and 11 deletions

View File

@@ -570,11 +570,12 @@ class WiredNetworkEntry(NetworkEntry):
profile = self.combo_profile_names.get_active_text()
cmdend = [os.path.join(wpath.lib, "configscript.py"), profile, "wired"]
if os.getuid() != 0:
cmdbase = misc.get_sudo_cmd()
cmdbase = misc.get_sudo_cmd(language['scripts_need_pass'])
if not cmdbase:
error(None, language["no_sudo_prog"])
return
cmdbase.extend(cmdend)
misc.LaunchAndWait(cmdbase)
else:
misc.LaunchAndWait(cmdend)
@@ -839,11 +840,12 @@ class WirelessNetworkEntry(NetworkEntry):
cmdend = [os.path.join(wpath.lib, "configscript.py"),
str(self.networkID), "wireless"]
if os.getuid() != 0:
cmdbase = misc.get_sudo_cmd()
cmdbase = misc.get_sudo_cmd(language['scripts_need_pass'])
if not cmdbase:
error(None, language["no_sudo_prog"])
return
cmdbase.extend(cmdend)
misc.LaunchAndWait(cmdbase)
else:
misc.LaunchAndWait(cmdend)