From 89d05deae7fbad7dab6bc9d86634ce037059220b Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Mon, 19 Jun 2017 12:03:01 +0100 Subject: [PATCH] Don't preinstall repos on mesh variant --- src/freedombone-image-customise | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/src/freedombone-image-customise b/src/freedombone-image-customise index 9dfe0008..1d834109 100755 --- a/src/freedombone-image-customise +++ b/src/freedombone-image-customise @@ -285,7 +285,7 @@ following commands, then enter your details. } configure_ssh() { - if [[ $VARIANT == "mesh" || $VARIANT == "meshclient" || $VARIANT == "meshusb" ]]; then + if [[ $VARIANT == "mesh"* ]]; then return fi @@ -320,7 +320,7 @@ create_generic_image() { fi # Don't install any configuration. This will be a base system - if [[ $VARIANT != "mesh" && $VARIANT != "meshclient" && $VARIANT != "meshusb" ]]; then + if [[ $VARIANT != "mesh"* ]]; then CONFIG_FILENAME= else touch $rootdir/root/.initial_mesh_setup @@ -403,7 +403,7 @@ EOF echo " git checkout stretch" >> $rootdir/root/.bashrc echo " make install" >> $rootdir/root/.bashrc - if [[ $VARIANT != "mesh" && $VARIANT != "meshclient" && $VARIANT != "meshusb" && $VARIANT != "usb" ]]; then + if [[ $VARIANT != "mesh"* && $VARIANT != "usb" ]]; then if [[ "$SOCIALINSTANCE" == "gnusocial" ]]; then echo " ${PROJECT_NAME} menuconfig-gnusocial" >> $rootdir/root/.bashrc else @@ -433,7 +433,7 @@ EOF echo ' rm /home/fbone/.initial_setup' >> $rootdir/root/.bashrc echo " touch /root/.remove_${GENERIC_IMAGE_USERNAME}" >> $rootdir/root/.bashrc echo ' shred -zu ~/login.txt' >> $rootdir/root/.bashrc - if [[ $VARIANT != "mesh" && $VARIANT != "meshclient" && $VARIANT != "meshusb" && $VARIANT != "usb" ]]; then + if [[ $VARIANT != "mesh"* && $VARIANT != "usb" ]]; then echo ' SSH_ONION_HOSTNAME=$(cat /var/lib/tor/hidden_service_ssh/hostname)' >> $rootdir/root/.bashrc echo ' if [ ${#SSH_ONION_HOSTNAME} -lt 2 ]; then' >> $rootdir/root/.bashrc @@ -583,7 +583,7 @@ INSTALL_DIR=$HOME/build INSTALLING_MESH= initialise_mesh() { - if [[ $VARIANT != "mesh" && $VARIANT != "meshclient" && $VARIANT != "meshusb" ]]; then + if [[ $VARIANT != "mesh"* ]]; then return fi if [[ $DEBIAN_INSTALL_ONLY != "no" ]]; then @@ -1236,6 +1236,10 @@ function image_install_nodejs { } function image_preinstall_repos { + if [[ $VARIANT == "mesh"* ]]; then + return + fi + if [ ! -d $rootdir/repos ]; then mkdir $rootdir/repos fi @@ -1364,7 +1368,7 @@ if [ -n "$CUSTOM_SETUP" ]; then chroot "$rootdir" gdebi -n /tmp/"$(basename $CUSTOM_SETUP)" fi -if [[ $VARIANT != "meshclient" && $VARIANT != "meshusb" && $VARIANT != "mesh" ]]; then +if [[ $VARIANT != "mesh"* ]]; then chroot "$rootdir" apt-get install -y openssh-server fi chroot "$rootdir" apt-get install -y sudo git dialog build-essential