aboutgitcodebugslistschat
path: root/doc
diff options
context:
space:
mode:
authorDavid Gibson <david@gibson.dropbear.id.au>2022-06-10 12:32:42 +1000
committerStefano Brivio <sbrivio@redhat.com>2022-06-15 09:38:10 +0200
commit2320ac3349789551e9c7500dba03e04b9ac02f41 (patch)
tree693d5ed12c2eb19061e1fc6e871199012a2d8db0 /doc
parent6703da44c16b9bdfc4d959db270961d8ab826570 (diff)
downloadpasst-2320ac3349789551e9c7500dba03e04b9ac02f41.tar
passt-2320ac3349789551e9c7500dba03e04b9ac02f41.tar.gz
passt-2320ac3349789551e9c7500dba03e04b9ac02f41.tar.bz2
passt-2320ac3349789551e9c7500dba03e04b9ac02f41.tar.lz
passt-2320ac3349789551e9c7500dba03e04b9ac02f41.tar.xz
passt-2320ac3349789551e9c7500dba03e04b9ac02f41.tar.zst
passt-2320ac3349789551e9c7500dba03e04b9ac02f41.zip
Don't abbreviate ip(8) arguments in examples and tests
ip(8)'s ability to take abbreviated arguments (e.g. "li sh" instead of "link show") is very handy when using it interactively, but it doesn't make for very readable scripts and examples when shown that way. Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'doc')
-rwxr-xr-xdoc/demo.sh8
1 files changed, 4 insertions, 4 deletions
diff --git a/doc/demo.sh b/doc/demo.sh
index 87fad1c..f49110a 100755
--- a/doc/demo.sh
+++ b/doc/demo.sh
@@ -19,9 +19,9 @@ get_token() {
unset IFS
}
-ipv6_dev() { get_token "dev" $(ip -o -6 ro show default | grep via); }
-ipv6_devaddr() { get_token "inet6" $(ip -o -6 ad sh dev "${1}" scope global); }
-ipv6_ll_addr() { get_token "inet6" $(ip -o -6 ad sh dev "${1}" scope link); }
+ipv6_dev() { get_token "dev" $(ip -o -6 route show default | grep via); }
+ipv6_devaddr() { get_token "inet6" $(ip -o -6 addr show dev "${1}" scope global); }
+ipv6_ll_addr() { get_token "inet6" $(ip -o -6 addr show dev "${1}" scope link); }
ipv6_mask() { echo ${1#*/}; }
ipv6_mangle() {
IFS=':'
@@ -93,7 +93,7 @@ if [ -n "${ipv6_addr}" ]; then
ip addr add "${ipv6_addr}" dev "veth_${ns}"
ip route add "${ipv6_passt}" dev "veth_${ns}"
passt_ll="$(ipv6_ll_addr "veth_${ns}")"
- main_ll="$(get_token "link/ether" $(ip -o li sh "veth_${ns}"))"
+ main_ll="$(get_token "link/ether" $(ip -o link show "veth_${ns}"))"
ip neigh add "${passt_ll%%/*}" dev "veth_${ns}" lladdr "${main_ll}"
ip -n "${ns}" route add default via "${passt_ll%%/*}" dev "veth_${ns}"