30-qubes-external-ip 227 B

12345678
  1. #!/bin/sh
  2. if [ x$2 == xup ]; then
  3. INET=$(/sbin/ip addr show dev $1 | /bin/grep inet)
  4. /usr/bin/xenstore-write qubes-netvm-external-ip "$INET"
  5. fi
  6. if [ x$2 == xdown ]; then
  7. /usr/bin/xenstore-write qubes-netvm-external-ip ""
  8. fi