diff options
| author | alex <alex@pdp7.net> | 2024-10-26 18:34:22 +0200 |
|---|---|---|
| committer | alexpdp7 <alex@corcoles.net> | 2024-10-26 18:36:00 +0200 |
| commit | f552ef3dcadcced2155c857d1e9aa3d5712e3f51 (patch) | |
| tree | 73794649910f0674f89ae357af6e12638f1ad8c8 /linux | |
| parent | 7bda6ecd6918ef5141934348ae01a909d0edc62c (diff) | |
Fix multiple route support
Diffstat (limited to 'linux')
| -rwxr-xr-x | linux/reroute.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/linux/reroute.py b/linux/reroute.py index db1a16ab..2e006477 100755 --- a/linux/reroute.py +++ b/linux/reroute.py @@ -26,11 +26,11 @@ def main(): parser.add_argument("ip") parser.add_argument("command", nargs="+") - parser.add_argument("--route", nargs="*", help="destination,gateway") + parser.add_argument("--route", action="append", help="destination,gateway") args = parser.parse_args() - routes = "".join([_make_route(r) for r in args.route]) + routes = "\n".join([_make_route(r) for r in args.route]) command = shlex.join(args.command) |
