Commit 304d80b2 authored by David Johnson's avatar David Johnson

Launch wfagents with correct arg ordering (for extra args).

(Interface name is always argv[1]; extras are argv[2:], if any.)
parent 13adfaf4
Pipeline #1910 passed with stage
in 2 seconds
......@@ -32,8 +32,12 @@ def main():
pidfile = sys.argv[1]
logfile = sys.argv[2]
iface = sys.argv[3]
args = sys.argv[4:]
args.append(iface)
prog = sys.argv[4]
args = [prog,iface]
if len(sys.argv) > 5:
for a in sys.argv[5:]:
args.append(a)
pass
pf = file(pidfile,'w')
lf = file(logfile,'a')
......@@ -61,7 +65,7 @@ def main():
else:
print "DEBUG: running %s" % (str(args))
pass
os.execve(sys.argv[4],args,newenviron)
os.execve(prog,args,newenviron)
return -1
else:
return 0
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment