mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 13:45:38 +00:00
run: detect daemons when run via wrapper commands
The run script tries to detect when a daemon is being run in order to shutdown other systemd unit files that clash. As implemented this only works if the daemon name is the first argument. This won't be the case if running via GDB or strace eg ./run strace -e trace=openat ./build/src/virtqemud We need to check all argv to find which might be a daemon path/name. Reviewed-by: Ján Tomko <jtomko@redhat.com> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
parent
6e1baedd2f
commit
f17b9c57c5
4
run.in
4
run.in
@ -130,9 +130,9 @@ def change_unit(name, action):
|
||||
|
||||
try_stop_units = []
|
||||
if is_systemd_host():
|
||||
name = os.path.basename(prog)
|
||||
|
||||
maybe_stopped_units = []
|
||||
for arg in sys.argv:
|
||||
name = os.path.basename(arg)
|
||||
if is_modular_daemon(name):
|
||||
# Only need to stop libvirtd or this specific modular unit
|
||||
maybe_stopped_units += daemon_units("libvirtd")
|
||||
|
Loading…
Reference in New Issue
Block a user