Merge remote-tracking branch 'origin/pr/55'

This commit is contained in:
Marek Marczykowski-Górecki 2015-12-11 15:13:56 +01:00
commit 6bed3bee69
No known key found for this signature in database
GPG Key ID: 063938BA42CFA724

View File

@ -3,10 +3,17 @@
# Setup gateway for all the VMs this netVM is serviceing...
network=$(qubesdb-read /qubes-netvm-network 2>/dev/null)
if [ "x$network" != "x" ]; then
if [ -e /proc/sys/kernel ] && ! [ -e /proc/sys/kernel/modules_disabled ]; then
readonly modprobe_fail_cmd='true'
else
readonly modprobe_fail_cmd='false'
fi
gateway=$(qubesdb-read /qubes-netvm-gateway)
netmask=$(qubesdb-read /qubes-netvm-netmask)
secondary_dns=$(qubesdb-read /qubes-netvm-secondary-dns)
modprobe netbk 2> /dev/null || modprobe xen-netback
modprobe netbk 2> /dev/null || modprobe xen-netback || "${modprobe_fail_cmd}"
echo "NS1=$gateway" > /var/run/qubes/qubes-ns
echo "NS2=$secondary_dns" >> /var/run/qubes/qubes-ns
/usr/lib/qubes/qubes-setup-dnat-to-ns