daemon: updated emane shutdown to kill emane daemon for a given interface, instead of killall
This commit is contained in:
parent
777097c85e
commit
3fcefc4d79
1 changed files with 4 additions and 9 deletions
|
@ -525,22 +525,17 @@ class EmaneManager:
|
|||
if self.links_enabled():
|
||||
self.link_monitor.stop()
|
||||
# shutdown interfaces
|
||||
nodes = set()
|
||||
for _, iface in self.get_ifaces():
|
||||
node = iface.node
|
||||
if not node.up:
|
||||
continue
|
||||
nodes.add(node)
|
||||
kill_cmd = f'pkill -f "emane.+{iface.name}"'
|
||||
if isinstance(node, CoreNode):
|
||||
iface.shutdown()
|
||||
iface.poshook = None
|
||||
kill_emaned = "killall -q emane"
|
||||
# stop all emane daemons on associated nodes
|
||||
for node in nodes:
|
||||
if isinstance(node, CoreNode):
|
||||
node.cmd(kill_emaned, wait=False)
|
||||
node.cmd(kill_cmd, wait=False)
|
||||
else:
|
||||
node.host_cmd(kill_emaned, wait=False)
|
||||
node.host_cmd(kill_cmd, wait=False)
|
||||
iface.poshook = None
|
||||
# stop emane event services
|
||||
while self.services:
|
||||
_, service = self.services.popitem()
|
||||
|
|
Loading…
Reference in a new issue