mirror of
https://github.com/Wojtek242/route0.git
synced 2024-11-21 06:55:24 +01:00
Provide own mapping of daemon names to ports
This commit is contained in:
parent
3d8b70eaaa
commit
97728ffe89
15
attach.py
15
attach.py
@ -43,7 +43,20 @@ def main():
|
||||
pid = get_pid(args.node)
|
||||
cmd = ' '.join(args.cmd)
|
||||
if args.daemon is not None:
|
||||
cmd = "telnet localhost {}".format(args.daemon)
|
||||
port_dict = {
|
||||
"zebrasrv": 2600,
|
||||
"zebra": 2601,
|
||||
"ripd": 2602,
|
||||
"ripngd": 2603,
|
||||
"ospfd": 2604,
|
||||
"bgpd": 2605,
|
||||
"ospf6d": 2606,
|
||||
"ospfapi": 2607,
|
||||
"isisd": 2608,
|
||||
"staticd": 2616,
|
||||
}
|
||||
|
||||
cmd = "telnet localhost {}".format(port_dict[args.daemon])
|
||||
|
||||
os.system("mnexec -a {} {}".format(pid, cmd))
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user