"bd") case "$action" in "started") [[ $step = "begin" ]] || { echo step must be begin; exit 0; } # La route dépend de l'adresse MAC de l'interface dédiée à l'IPv6 : # address="$(virsh dumpxml bling |grep -A 1 ethernet | grep -oP "([[:xdigit:]]{1,2}:){5}[[:xdigit:]]{1,2}")"; echo "fe80::5054:ff:fe${address:0:2}:${address:2:4}" /sbin/ip route add 2a01:4f8:222:6a1::42/128 via fe80::5054:ff:fec3:d645 dev vm-bling-ipv6 /sbin/ip route add 2a01:4f8:222:664::42/128 via fe80::5054:ff:fec3:d645 dev vm-bling-ipv6 ;; "stopped") [[ $step = "end" ]] || { echo step must be end; exit 0; } /sbin/ip route del 2a01:4f8:222:6a1::42/128 via fe80::5054:ff:fec3:d645 dev vm-bling-ipv6 /sbin/ip route del 2a01:4f8:222:664::42/128 via fe80::5054:ff:fec3:d645 dev vm-bling-ipv6 ;; *) echo action $action not supported exit 0 ;; esac ;;