core-agent-linux/network/30-qubes-external-ip
2013-03-14 04:29:15 +01:00

9 lines
227 B
Bash
Executable File

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