#!/bin/sh # vim: set ts=4 sw=4 sts=4 et : # ------------------------------------------------------------------------------ # Source external scripts # ------------------------------------------------------------------------------ . ${SCRIPTSDIR}/vars.sh . ./umount_kill.sh >/dev/null # ------------------------------------------------------------------------------ # Configurations # ------------------------------------------------------------------------------ if [ "${VERBOSE}" -ge 2 -o "${DEBUG}" == "1" ]; then set -x else set -e fi # ------------------------------------------------------------------------------ # If .prepared_groups has not been completed, don't continue # ------------------------------------------------------------------------------ if ! [ -f "${INSTALLDIR}/tmp/.prepared_groups" ]; then error "prepared_groups installataion has not completed!... Exiting" exit 1 fi # ------------------------------------------------------------------------------ # Mount system mount points # ------------------------------------------------------------------------------ for fs in /dev /dev/pts /proc /sys; do mount -B $fs "${INSTALLDIR}/$fs"; done mount -t tmpfs none "${INSTALLDIR}/run" # ------------------------------------------------------------------------------ # Execute any template flavor or sub flavor 'pre' scripts # ------------------------------------------------------------------------------ buildStep "$0" "pre" # ------------------------------------------------------------------------------ # Install Qubes Packages # ------------------------------------------------------------------------------ if ! [ -f "${INSTALLDIR}/tmp/.prepared_qubes" ]; then debug "Installing qbues modules" # -------------------------------------------------------------------------- # Set up a temporary policy-rc.d to prevent apt from starting services # on package installation # -------------------------------------------------------------------------- cat > "${INSTALLCHROOT}/usr/sbin/policy-rc.d" <> "${INSTALLDIR}/etc/locale.gen" chroot "${INSTALLDIR}" locale-gen chroot "${INSTALLDIR}" update-locale LANG=en_US.UTF-8 # -------------------------------------------------------------------------- # Link mtab # -------------------------------------------------------------------------- rm -f "${INSTALLDIR}/etc/mtab" ln -s "../proc/self/mounts" "${INSTALLDIR}/etc/mtab" # -------------------------------------------------------------------------- # Start of Qubes package installation # -------------------------------------------------------------------------- debug "Installing qubes packages" export CUSTOMREPO="${PWD}/yum_repo_qubes/${DIST}" # -------------------------------------------------------------------------- # Install keyrings # -------------------------------------------------------------------------- if ! [ -e "${CACHEDIR}/repo-secring.gpg" ]; then mkdir -p "${CACHEDIR}" gpg --gen-key --batch < "${INSTALLDIR}/etc/apt/sources.list.d/qubes-builder.list" <