From be907a0b9b780bb31344c8be0574204056ea7b4e Mon Sep 17 00:00:00 2001 From: Reza Jelveh Date: Mon, 27 Nov 2017 10:14:58 +0100 Subject: [PATCH] SmartOS: add LX_ZONE detection --- setup/preflight.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/setup/preflight.sh b/setup/preflight.sh index 2547c410..87bd7151 100644 --- a/setup/preflight.sh +++ b/setup/preflight.sh @@ -64,3 +64,13 @@ if [ "$ARCHITECTURE" != "x86_64" ] && [ "$ARCHITECTURE" != "i686" ]; then echo "You are on your own." echo fi + + +# Check if we're running in a SmartOS LX zone and disable firewall and +# accordingly. +KERNEL_VERSION=$(uname -v) +if [[ "$KERNEL_VERSION" =~ "BrandZ virtual linux" ]]; then + echo "WARNING: Mail-in-a-Box will disable firewall setttings please make sure to handle this yourself." + DISABLE_FIREWALL=1 + LX_ZONE=1 +fi