You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
883 B
31 lines
883 B
#!/bin/bash
|
|
|
|
. /usr/lib/whonix/utility_functions
|
|
|
|
if [ "${WHONIX}" != "template" ]; then
|
|
# Files that will have the immutable bit set
|
|
# since we don't want them modified by other programs
|
|
IMMUTABLE_FILES=(
|
|
'/etc/resolv.conf'
|
|
'/etc/hostname'
|
|
'/etc/hosts'
|
|
)
|
|
|
|
# Make sure all .anondist files in list are immutable
|
|
immutableFilesEnable "${IMMUTABLE_FILES}"
|
|
immutableFilesEnable "${IMMUTABLE_FILES}" ".anondist"
|
|
|
|
# Make sure we are using a copy of the annondist file and if not
|
|
# copy the annondist file and set it immutable
|
|
copyAnondist "/etc/resolv.conf"
|
|
copyAnondist "/etc/hosts"
|
|
copyAnondist "/etc/hostname"
|
|
|
|
# Replace IP addresses in known configuration files / scripts to
|
|
# currently discovered one
|
|
/usr/lib/whonix/init/replace-ips
|
|
|
|
# Make sure hostname is correct
|
|
/bin/hostname host
|
|
fi
|