Restore functionality of disable-default-route and disable-dns-server.
This commit is contained in:
parent
7787d39b6e
commit
1ca110a9fd
@ -51,19 +51,19 @@ __EOF__
|
||||
/sbin/ifconfig $INTERFACE $ip netmask 255.255.255.255
|
||||
/sbin/ifconfig $INTERFACE up
|
||||
/sbin/route add -host $gateway dev $INTERFACE
|
||||
if [ "x$disablegw" != "x1" ]; then
|
||||
if ! qsvc disable-default-route ; then
|
||||
/sbin/route add default gw $gateway
|
||||
fi
|
||||
if ! is_protected_file /etc/resolv.conf ; then
|
||||
echo > /etc/resolv.conf
|
||||
if [ "x$disabledns" != "x1" ]; then
|
||||
if ! qsvc disable-dns-server ; then
|
||||
echo "nameserver $primary_dns" > /etc/resolv.conf
|
||||
echo "nameserver $secondary_dns" >> /etc/resolv.conf
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
network=$(qubesdb-read /qubes-netvm-network 2>/dev/null)
|
||||
if [ "x$network" != "x" ] && [ "x$disabledns" != "x1" ]; then
|
||||
if [ "x$network" != "x" ] && ! qsvc disable-dns-server ; then
|
||||
gateway=$(qubesdb-read /qubes-netvm-gateway)
|
||||
netmask=$(qubesdb-read /qubes-netvm-netmask)
|
||||
primary_dns=$(qubesdb-read /qubes-netvm-primary-dns 2>/dev/null || echo $gateway)
|
||||
|
Loading…
Reference in New Issue
Block a user