qubes-linux-template-builder/scripts_debian/wheezy+whonix/04_install_qubes_post.sh

49 lines
1.5 KiB
Bash
Raw Normal View History

#!/bin/bash
# vim: set ts=4 sw=4 sts=4 et :
#
# Whonix Post Install Steps (after qubes install)
#
# ------------------------------------------------------------------------------
# Source external scripts
# ------------------------------------------------------------------------------
2014-10-28 08:09:55 +00:00
. ${SCRIPTSDIR}/vars.sh
# ------------------------------------------------------------------------------
# Configurations
# ------------------------------------------------------------------------------
2014-10-28 08:09:55 +00:00
if [ "${VERBOSE}" -ge 2 -o "${DEBUG}" == "1" ]; then
set -x
else
set -e
fi
# ------------------------------------------------------------------------------
# Restore Whonix apt-get
# ------------------------------------------------------------------------------
2014-10-28 08:09:55 +00:00
pushd "${INSTALLDIR}/usr/bin"
{
rm -f apt-get;
cp -p apt-get.anondist apt-get;
}
popd
# ------------------------------------------------------------------------------
# Restore whonix resolv.conf
# ------------------------------------------------------------------------------
2014-10-28 08:09:55 +00:00
pushd "${INSTALLDIR}/etc"
2014-10-26 18:46:20 +00:00
{
2014-10-28 08:09:55 +00:00
rm -f resolv.conf;
cp -p resolv.conf.anondist resolv.conf;
2014-10-26 18:46:20 +00:00
}
popd
# ------------------------------------------------------------------------------
# Cleanup Whonix Installation
# ------------------------------------------------------------------------------
2014-10-28 08:09:55 +00:00
rm -rf "${INSTALLDIR}"/home/user/Whonix
rm -rf "${INSTALLDIR}"/home/user/whonix_binary
rm -f "${INSTALLDIR}"/home/user/whonix_fix
rm -f "${INSTALLDIR}"/home/user/whonix_build.sh