#!/bin/sh set -e _test_and_remove_package() { # Remove package rc=0 chroot /target dpkg -s ${1} >/dev/null 2>/dev/null || rc=1 if [ ${rc} -eq 0 ]; then chroot /target apt-get purge ${1} --force-yes -y else echo "[ LliureX Casper Msg]: Package ${1} not found...nothing to do" fi } # Removing packages from installation for package in lliurex-live-ubiquity ubiquity ubiquity-casper ubiquity-frontend-gtk ubiquity-ubuntu-artwork; do _test_and_remove_package ${package} done # Remove some sources.list.d files #rm -rf /target/etc/apt/sources.list.d/* # DEFAULT sources.list is lliurex.net # chroot /target/ llx-apt-cmd reset "lliurex.net" # Getting the current lliurex-version (Flavour and adjustt the sources.list to the # desired configuration. rc=0 lliurex-version -t infantil || rc=1 if [ $rc -eq 0 ] ; then echo "deb http://lliurex.net/recursos-edu trusty main" > /target/etc/apt/sources.list.d/lliurex-infantil.list fi chroot /target/ apt-get update exit 0