*: Use action_utils.run instead of subprocess.call

- This is to capture stdout and stderr and transmit that from privileged daemon
back to the service to be displayed in HTML.

Tests:

- Unit tests and code checks pass.

- Some of the modified actions work as expected.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
This commit is contained in:
Sunil Mohan Adapa authored and Veiko Aasa committed 2025-09-29 16:58:55 +03:00
1 parent 80e6d940a4
commit bf9005ac48
5 files changed
+15 -17

No files matched your search

+2 -2
View File
@@ -104,8 +104,8 @@ def _setup_firewall():
'firewall-cmd', '--zone', 'internal',
'--{}-interface'.format(operation), interface
]
subprocess.call(command)
subprocess.call(command + ['--permanent'])
action_utils.run(command, check=False)
action_utils.run(command + ['--permanent'], check=False)
def _is_tunplus_enabled():
"""Return whether tun+ interface is already added."""