mirror of
https://github.com/os-mnemo/pan-globalprotect-okta
synced 2026-07-31 15:54:36 +02:00
+6
-2
@@ -24,7 +24,7 @@
|
|||||||
THE SOFTWARE.
|
THE SOFTWARE.
|
||||||
"""
|
"""
|
||||||
from __future__ import print_function
|
from __future__ import print_function
|
||||||
import io, os, sys, re, json, base64, getpass, subprocess, shlex
|
import io, os, sys, re, json, base64, getpass, subprocess, shlex, signal
|
||||||
from lxml import etree
|
from lxml import etree
|
||||||
import requests
|
import requests
|
||||||
|
|
||||||
@@ -361,8 +361,12 @@ def main():
|
|||||||
cmd = shlex.split(cmd)
|
cmd = shlex.split(cmd)
|
||||||
cmd = [os.path.expandvars(os.path.expanduser(x)) for x in cmd]
|
cmd = [os.path.expandvars(os.path.expanduser(x)) for x in cmd]
|
||||||
pp = subprocess.Popen(shlex.split(pcmd), stdout=subprocess.PIPE)
|
pp = subprocess.Popen(shlex.split(pcmd), stdout=subprocess.PIPE)
|
||||||
cp = subprocess.Popen(cmd, stdin=pp.stdout, stdout=subprocess.PIPE)
|
cp = subprocess.Popen(cmd, stdin=pp.stdout, stdout=sys.stdout)
|
||||||
pp.stdout.close()
|
pp.stdout.close()
|
||||||
|
|
||||||
|
# Do not abort on SIGINT. openconnect will see it, and perform proper exit & cleanup
|
||||||
|
signal.signal(signal.SIGINT, signal.SIG_IGN)
|
||||||
|
|
||||||
cp.communicate()
|
cp.communicate()
|
||||||
else:
|
else:
|
||||||
print('{0} | {1}'.format(pcmd, cmd))
|
print('{0} | {1}'.format(pcmd, cmd))
|
||||||
|
|||||||
Reference in New Issue
Block a user