Revert "network: use the same gateway IP generation method as backend"
This reverts commit 4ef785a016
.
Actually this change was wrong - the frontend IP was correct, the
problem was with backend IP.
This commit is contained in:
parent
4ef785a016
commit
a288939156
@ -1,4 +1,4 @@
|
||||
#!/bin/bash
|
||||
#!/bin/sh
|
||||
|
||||
if [ -x /usr/sbin/xenstore-read ]; then
|
||||
XENSTORE_READ="/usr/sbin/xenstore-read"
|
||||
@ -9,16 +9,15 @@ fi
|
||||
ip=`$XENSTORE_READ qubes-ip 2> /dev/null`
|
||||
if [ x$ip != x ]; then
|
||||
netmask=`$XENSTORE_READ qubes-netmask`
|
||||
primary_dns=`$XENSTORE_READ qubes-gateway`
|
||||
gateway=`$XENSTORE_READ qubes-gateway`
|
||||
secondary_dns=`$XENSTORE_READ qubes-secondary-dns`
|
||||
/sbin/ifconfig $INTERFACE $ip netmask 255.255.255.255
|
||||
/sbin/ifconfig $INTERFACE up
|
||||
gw_ip=${ip%.*}.1
|
||||
/sbin/route add -host $gw_ip dev $INTERFACE
|
||||
/sbin/route add default gw $gw_ip
|
||||
/sbin/route add -host $gateway dev $INTERFACE
|
||||
/sbin/route add default gw $gateway
|
||||
/sbin/ethtool -K $INTERFACE sg off
|
||||
/sbin/ethtool -K $INTERFACE tx off
|
||||
echo "nameserver $primary_dns" > /etc/resolv.conf
|
||||
echo "nameserver $gateway" > /etc/resolv.conf
|
||||
echo "nameserver $secondary_dns" >> /etc/resolv.conf
|
||||
network=$($XENSTORE_READ qubes-netvm-network 2>/dev/null)
|
||||
if [ "x$network" != "x" ]; then
|
||||
|
Loading…
Reference in New Issue
Block a user