f597ff760f
Added ability to specify more than one TEMPLATE_FLAVOR (Primary plus others) Added ability for all TEMPLATE_FLAVORS and others to be able to hook into scripts (pre / post) Addeed tests for above functionality With these changes TEMPLATE_FLAVORS can be self contained and not polute code space
39 lines
1.0 KiB
Bash
Executable File
39 lines
1.0 KiB
Bash
Executable File
#!/bin/sh
|
|
|
|
if [ -x /usr/sbin/xenstore-read ]; then
|
|
XENSTORE_READ="/usr/sbin/xenstore-read"
|
|
else
|
|
XENSTORE_READ="/usr/bin/xenstore-read"
|
|
fi
|
|
|
|
# Create a dummy eth1 interface so tor can bind to it if there
|
|
# are no DOMU virtual machines connected at the moment
|
|
INTERFACE="eth1"
|
|
/sbin/ip link add $INTERFACE type dummy
|
|
|
|
# Now, assign it the netvm-gateway IP address
|
|
ip=$($XENSTORE_READ qubes-netvm-gateway 2> /dev/null)
|
|
if [ x$ip != x ]; then
|
|
netmask=$($XENSTORE_READ qubes-netvm-netmask)
|
|
gateway=$($XENSTORE_READ qubes-netvm-gateway)
|
|
/sbin/ifconfig $INTERFACE $ip netmask 255.255.255.255
|
|
/sbin/ifconfig $INTERFACE up
|
|
/sbin/ethtool -K $INTERFACE sg off
|
|
/sbin/ethtool -K $INTERFACE tx off
|
|
fi
|
|
|
|
# Replace IP addresses in known configuration files / scripts to
|
|
# currently discovered one
|
|
/usr/lib/whonix/replace-ips
|
|
|
|
# Make sure we have correct nameserver set
|
|
echo "nameserver 127.0.0.1" > /etc/resolv.conf
|
|
|
|
# Make sure hostname is correct
|
|
/bin/hostname -b host
|
|
|
|
# Start Whonix Firewall
|
|
export INT_IF="vif+"
|
|
export INT_TIF="vif+"
|
|
/usr/bin/whonix_firewall
|