mirror of
https://github.com/gryf/wicd.git
synced 2025-12-20 04:48:00 +01:00
Added disconnect script feature and executing script in usermode feature to testing branch
17 lines
350 B
Python
Executable File
17 lines
350 B
Python
Executable File
#!/usr/bin/python
|
|
##
|
|
#Simple script that converts command line args to a string and executes it in usermode
|
|
##
|
|
import os,sys,misc
|
|
|
|
print 'executing script in user mode'
|
|
os.setuid(1000)
|
|
command = ''
|
|
for stuff in sys.argv[1:]:
|
|
command = command + ' ' + stuff
|
|
print 'command = ',command
|
|
pid = os.fork()
|
|
print 'hey'
|
|
if not pid:
|
|
misc.Run(command)
|