From e07c8eb2a58d9f3344a00d2061bdbf067887ef93 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sat, 13 Aug 2016 10:12:23 +0100 Subject: [PATCH] Configure backports and contrib repo before update --- src/freedombone-app-ipfs | 2 ++ src/freedombone-image-customise | 21 ++++++++++++--------- 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/src/freedombone-app-ipfs b/src/freedombone-app-ipfs index 1fdd7d2a..feecc0a1 100755 --- a/src/freedombone-app-ipfs +++ b/src/freedombone-app-ipfs @@ -206,6 +206,7 @@ function mesh_install_ipfs_js { return fi + chroot ${rootdir} apt-get -y install nodejs chroot ${rootdir} apt-get -y install npm chroot ${rootdir} apt-get -y install libpam0g-dev fuse @@ -273,6 +274,7 @@ function install_ipfs_js { return fi + apt-get -y install nodejs apt-get -y install npm apt-get -y install libpam0g-dev fuse diff --git a/src/freedombone-image-customise b/src/freedombone-image-customise index b3b82716..d5d1e71e 100755 --- a/src/freedombone-image-customise +++ b/src/freedombone-image-customise @@ -116,6 +116,16 @@ MESH_SET_USERNAME=$"Welcome to the Freedombone mesh.\n\nThe first thing you will # Whether to enable zeronet on the mesh ENABLE_ZERONET= +function configure_backports { + echo "deb http://${DEBIAN_REPO}/debian/ ${DEBIAN_VERSION}-backports main" >> $rootdir/etc/apt/sources.list +} + +function configure_contrib_repo { + if ! grep -q "contrib" $rootdir/etc/apt/sources.list; then + chroot "$rootdir" sed -i "s| main| main contrib|g" /etc/apt/sources.list + fi +} + enable_eatmydata_override() { chroot $rootdir apt-get install --no-install-recommends -y eatmydata if [ -x $rootdir/usr/bin/eatmydata ] && \ @@ -530,11 +540,6 @@ initialise_mesh() { chroot "$rootdir" sed -i "s| main| main non-free|g" /etc/apt/sources.list fi - # enable contrib repo - if ! grep -q "contrib" $rootdir/etc/apt/sources.list; then - chroot "$rootdir" sed -i "s| main| main contrib|g" /etc/apt/sources.list - fi - chroot "$rootdir" apt-get update # install proprietary wifi drivers @@ -692,10 +697,6 @@ function configure_user_interface { DEBIAN_VERSION='jessie' fi - # install backports - echo "deb http://${DEBIAN_REPO}/debian/ ${DEBIAN_VERSION}-backports main" >> $rootdir/etc/apt/sources.list - chroot "$rootdir" apt-get -y update - # desktop chroot "$rootdir" apt-get -y install mate-desktop-environment @@ -837,6 +838,8 @@ set_apt_sources $BUILD_MIRROR chroot "$rootdir" apt-get clean chroot "$rootdir" rm -rf /var/lib/apt/lists/* chroot "$rootdir" apt-get clean +configure_backports +configure_contrib_repo chroot "$rootdir" apt-get update cat > $rootdir/usr/sbin/policy-rc.d <