Update to be compatible with Ubuntu 12 and newer

This commit is contained in:
Alice Chen
2014-10-09 23:47:43 -07:00
parent 929ef89a40
commit 0e61e8274c
5 changed files with 21 additions and 15 deletions
+2 -4
View File
@@ -27,11 +27,9 @@ fi
# * ldnsutils: Helper utilities for signing DNSSEC zones.
# * openssh-client: Provides ssh-keyscan which we use to create SSHFP records.
apt_install nsd ldnsutils openssh-client
apt_install $NSD_PACKAGE ldnsutils openssh-client
# Prepare nsd's configuration.
mkdir -p /var/run/nsd
mkdir -p /var/run/$NSD_PACKAGE
# Create DNSSEC signing keys.
+2 -2
View File
@@ -8,8 +8,8 @@ if [[ $EUID -ne 0 ]]; then
fi
# Check that we are running on Ubuntu 14.04 LTS (or 14.04.xx).
if [ "`lsb_release -d | sed 's/.*:\s*//' | sed 's/14\.04\.[0-9]/14.04/' `" != "Ubuntu 14.04 LTS" ]; then
echo "Mail-in-a-Box only supports being installed on Ubuntu 14.04, sorry. You are running:"
if [ `lsb_release -d | sed 's/.*:\sUbuntu *//' | cut -d'.' -f1` -lt 12 ]; then
echo "Mail-in-a-Box only supports being installed on Ubuntu 12 and newer, sorry. You are running:"
echo
lsb_release -d | sed 's/.*:\s*//'
echo
+8
View File
@@ -8,6 +8,13 @@ source setup/functions.sh # load our functions
# machine with enough memory? If not, this shows an error and exits.
source setup/preflight.sh
# if Ubuntu major version is less than 14 use nsd3 package
if [ `lsb_release -d | sed 's/.*:\sUbuntu *//' | cut -d'.' -f1` -lt 14 ]; then
NSD_PACKAGE="nsd3"
else
NSD_PACKAGE="nsd"
fi
# Ensure Python reads/writes files in UTF-8. If the machine
# triggers some other locale in Python, like ASCII encoding,
# Python may not be able to read/write files. Here and in
@@ -109,6 +116,7 @@ PUBLIC_IPV6=$PUBLIC_IPV6
PRIVATE_IP=$PRIVATE_IP
PRIVATE_IPV6=$PRIVATE_IPV6
CSR_COUNTRY=$CSR_COUNTRY
NSD_PACKAGE=$NSD_PACKAGE
EOF
# Start service configuration.