Skip to content
Snippets Groups Projects
Commit eed4a649 authored by Florent Thiery's avatar Florent Thiery
Browse files

fix updating of the configuration file, refs #26945

parent 8c956ac9
No related branches found
No related tags found
No related merge requests found
......@@ -22,23 +22,23 @@ def setup(interactive=True):
cmd = cmd_template % c
cmds.append(cmd)
with open('/etc/miris/netcapture.json', 'r+') as f:
with open('/etc/miris/netcapture.json', 'r') as f:
c = json.load(f)
c['campusmanager_check_ssl'] = False
json.dump(c, f)
cmds.append('rsync -r mirisconf/ /etc/miris/conf')
cmds.append('netcapturectl add')
c['campusmanager_check_ssl'] = False
# try to enable hw accel if available
subprocess.getstatusoutput("apt install -y vainfo")
if subprocess.getstatusoutput("vainfo")[0] == 0:
# hw acceleration requires boot-time module options so a reboot will be needed
with open('/etc/miris/netcapture.json', 'r+') as f:
c = json.load(f)
c['enable_hw_acceleration'] = True
json.dump(c, f)
c['enable_hw_acceleration'] = True
cmds.append('echo "options i915 enable_guc_loading=1 enable_guc_submission=1" > /etc/modprobe.d/netcapture.conf')
cmds.append('update-initramfs -u')
print('A reboot is required')
with open('/etc/miris/netcapture.json', 'w') as f:
json.dump(c, f)
cmds.append('rsync -r mirisconf/ /etc/miris/conf')
cmds.append('netcapturectl add')
utils.run_commands(cmds)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment