dom0/qubes-dom0-network-via-netvm: use iproute instead of net-tools

Apparently net-tools isn't installed by default in fc18-based dom0.
This commit is contained in:
Marek Marczykowski 2013-03-03 20:06:20 +01:00
parent d048608c8c
commit 35cdaf5b81

View File

@ -55,7 +55,8 @@ def bringup_eth0(netvm):
resolv_conf.write('nameserver ' + netvm.gateway + '\n')
resolv_conf.write('nameserver ' + netvm.secondary_dns + '\n')
resolv_conf.close()
return os.system('ifconfig eth0 10.137.0.2 netmask 255.255.255.255 && route add default dev eth0') == 0
return os.system('ip link set eth0 up && ip addr add 10.137.0.2/32 dev eth0 && ' +
'ip route add 10.137.0.1 dev eth0 && ip route add via 10.137.0.1') == 0
def netup():
netvm = get_netvm()