Add a script to get the next hop in a route.
I never remember the incantation, and its slightly different between FreeBSD and Linux so I am adding this script essentially as a note.
This commit is contained in:
7
ansible/roles/network/files/next_hop_freebsd.bash
Normal file
7
ansible/roles/network/files/next_hop_freebsd.bash
Normal file
@@ -0,0 +1,7 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
set -euo pipefail
|
||||
IFS=$'\n\t'
|
||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
|
||||
exec route get "${@}"
|
||||
7
ansible/roles/network/files/next_hop_linux.bash
Normal file
7
ansible/roles/network/files/next_hop_linux.bash
Normal file
@@ -0,0 +1,7 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
set -euo pipefail
|
||||
IFS=$'\n\t'
|
||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
|
||||
exec ip route get "${@}"
|
||||
Reference in New Issue
Block a user