qubes-linux-template-builder/scripts_debian/02_install_groups_wheezy.sh
Jason Mehring 78a903b1f7 debian: Completely refactored Debian and Whonix
- New refactor allow qubuntu to share most of Debian's codebase
- Installation now more closely mimiks Debian's installation methods
- Added a shared functions lib named distributions.sh
- Any portions of Whonix that may need to be updatable have been moved
  to a new package named qubes-whonix which will be updatable via Debian
  package manager.  qubes-whonix is also added as part of installation
  process
2015-02-14 12:33:06 -05:00

90 lines
4.0 KiB
Bash
Executable File

#!/bin/bash -e
# vim: set ts=4 sw=4 sts=4 et :
source "${SCRIPTSDIR}/vars.sh"
source "${SCRIPTSDIR}/distribution.sh"
##### "=========================================================================
debug " Installing custom packages and customizing ${DIST}"
##### "=========================================================================
#### '--------------------------------------------------------------------------
info ' Adding contrib, non-free and Debian security to repository.'
#### '--------------------------------------------------------------------------
updateDebianSourceList
#### '----------------------------------------------------------------------
info ' Adding wheezy backports repository.'
#### '----------------------------------------------------------------------
source="deb ${DEBIAN_MIRROR} wheezy-backports main"
if ! grep -r -q "$source" "${INSTALLDIR}/etc/apt/sources.list"*; then
touch "${INSTALLDIR}/etc/apt/sources.list"
echo "$source" >> "${INSTALLDIR}/etc/apt/sources.list"
fi
aptUpdate
##### '=========================================================================
debug ' Replace sysvinit with systemd'
##### '=========================================================================
#### '----------------------------------------------------------------------
info ' Remove sysvinit'
#### '----------------------------------------------------------------------
echo 'Yes, do as I say!' | aptRemove sysvinit
#### '----------------------------------------------------------------------
info ' Preventing sysvinit re-installation'
#### '----------------------------------------------------------------------
chroot apt-mark hold sysvinit
#### '----------------------------------------------------------------------
info ' Pin sysvinit to prevent being re-installed'
#### '----------------------------------------------------------------------
cat > "${INSTALLDIR}/etc/apt/preferences.d/qubes_sysvinit" <<EOF
Package: sysvinit
Pin: version *
Pin-Priority: -100
EOF
chmod 0644 "${INSTALLDIR}/etc/apt/preferences.d/qubes_sysvinit"
#### '----------------------------------------------------------------------
info ' Install Systemd'
#### '----------------------------------------------------------------------
aptUpdate
aptInstall systemd-sysv
#### '----------------------------------------------------------------------
info ' Set multu-user.target as the default target (runlevel 3)'
#### '----------------------------------------------------------------------
chroot rm -f /etc/systemd/system/default.target
chroot ln -sf /lib/systemd/system/multi-user.target /etc/systemd/system/default.target
# ==============================================================================
# Install backports
#
# NOTE: This needs to be done after systemd has been installed or risk backport
# being un-installed
# ==============================================================================
#### '----------------------------------------------------------------------
info ' Installing init-system-helpers'
#### '----------------------------------------------------------------------
aptUpdate
DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true \
chroot apt-get ${APT_GET_OPTIONS} -t wheezy-backports install init-system-helpers
#### '----------------------------------------------------------------------
info ' Installing pulseaudo backport'
#### '----------------------------------------------------------------------
# /usr/lib/pulse-4.0/modules/
# start-pulseaudio-with-vchan
#DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true \
# chroot apt-get ${APT_GET_OPTIONS} -t wheezy-backports install pulseaudio \
# libpulse0 \
# pulseaudio-utils \
# libpulse-mainloop-glib0 \
# pulseaudio-module-x11