From eea614e263f1938a57a83701380b97444736788c Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Tue, 27 Mar 2018 10:25:21 +0100 Subject: [PATCH] Prevent nodejs package upgrades --- src/freedombone-base-email | 20 +++++++++++++++----- src/freedombone-utils-nodejs | 1 + 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/src/freedombone-base-email b/src/freedombone-base-email index 107c09dd..119b177d 100755 --- a/src/freedombone-base-email +++ b/src/freedombone-base-email @@ -161,7 +161,11 @@ function configure_email_onion { #apt-get -yq install tinycdb perl # MX record should be: - # _onion-mx._tcp.$DEFAULT_DOMAIN_NAME. 3600 IN SRV 0 5 25 $onion_address + # _onion-mx._tcp + # 20:$onion_address + # 3600 IN SRV 0 5 25 $onion_address + + # Test with: exim -d -bt $onion_address #echo "$DEFAULT_DOMAIN_NAME $onion_address" > /etc/exim4/onionrelay.txt #cdb -m -c -t ~/onionrelay.tmp /etc/exim4/onionrelay.cdb /etc/exim4/onionrelay.txt @@ -850,12 +854,18 @@ function install_email_basic { sed -i 's|pam_mail.so standard noenv|pam_mail.so dir=~/Maildir standard|g' /etc/pam.d/sshd sed -i 's|pam_mail.so nopen|pam_mail.so dir=~/Maildir nopen|g' /etc/pam.d/su - { echo "dc_eximconfig_configtype='internet'"; - echo "dc_other_hostnames='${DEFAULT_DOMAIN_NAME};mail.${DEFAULT_DOMAIN_NAME}'"; - echo "dc_local_interfaces=''"; + echo "dc_eximconfig_configtype='internet'" > /etc/exim4/update-exim4.conf.conf + + if [[ $ONION_ONLY == 'no' ]]; then + echo "dc_other_hostnames='${DEFAULT_DOMAIN_NAME};mail.${DEFAULT_DOMAIN_NAME}'" >> /etc/exim4/update-exim4.conf.conf + else + echo "dc_other_hostnames='${onion_address}'" >> /etc/exim4/update-exim4.conf.conf + fi + + { echo "dc_local_interfaces=''"; echo "dc_readhost=''"; echo "dc_relay_domains=''"; - echo "dc_minimaldns='false'"; } > /etc/exim4/update-exim4.conf.conf + echo "dc_minimaldns='false'"; } >> /etc/exim4/update-exim4.conf.conf IPv4_address=$(get_ipv4_address) IPv4_address_base=$(echo "$IPv4_address" | awk -F '.' '{print $1"."$2"."$3}') RELAY_NETS="${IPv4_address_base}.0/24" diff --git a/src/freedombone-utils-nodejs b/src/freedombone-utils-nodejs index 28b13cb2..96846900 100755 --- a/src/freedombone-utils-nodejs +++ b/src/freedombone-utils-nodejs @@ -95,6 +95,7 @@ function mesh_install_nodejs { fi $mesh_install_nodejs_prefix apt-get -yq install nodejs + $mesh_install_nodejs_prefix apt-mark -q hold nodejs if [ -f "$rootdir/usr/bin/nodejs" ]; then cp "$rootdir/usr/bin/nodejs" "$rootdir/usr/bin/node"