|
|
@ -250,6 +250,8 @@ def do_install(log_dir, datafilename): |
|
|
|
run_install_script(d) |
|
|
|
run_install_script(d) |
|
|
|
except PermissionError: |
|
|
|
except PermissionError: |
|
|
|
if shutil.which('pkexec') is not None and 'PKEXEC_UID' not in os.environ: |
|
|
|
if shutil.which('pkexec') is not None and 'PKEXEC_UID' not in os.environ: |
|
|
|
|
|
|
|
print('Installation failed due to insufficient permissions.') |
|
|
|
|
|
|
|
print('Attempting to use polkit to gain elevated privileges...') |
|
|
|
os.execlp('pkexec', 'pkexec', sys.executable, main_file, *sys.argv[1:], |
|
|
|
os.execlp('pkexec', 'pkexec', sys.executable, main_file, *sys.argv[1:], |
|
|
|
os.getcwd()) |
|
|
|
os.getcwd()) |
|
|
|
else: |
|
|
|
else: |
|
|
|