2011-04-23 02:31:54 +02:00
|
|
|
#!/bin/sh
|
|
|
|
|
2011-07-13 20:16:04 +02:00
|
|
|
ip=`/usr/bin/xenstore-read qubes_ip 2> /dev/null`
|
2011-04-23 02:31:54 +02:00
|
|
|
if [ x$ip != x ]; then
|
2011-07-13 20:16:04 +02:00
|
|
|
netmask=`/usr/bin/xenstore-read qubes_netmask`
|
|
|
|
gateway=`/usr/bin/xenstore-read qubes_gateway`
|
|
|
|
secondary_dns=`/usr/bin/xenstore-read qubes_secondary_dns`
|
2011-04-23 02:32:54 +02:00
|
|
|
/sbin/ifconfig $INTERFACE $ip netmask 255.255.255.255
|
|
|
|
/sbin/ifconfig $INTERFACE up
|
2011-04-23 02:31:54 +02:00
|
|
|
/sbin/route add default dev $INTERFACE
|
|
|
|
echo "nameserver $gateway" > /etc/resolv.conf
|
|
|
|
echo "nameserver $secondary_dns" >> /etc/resolv.conf
|
|
|
|
fi
|