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