From 538f1cf8ea636b311c4b86c87532ffd8712d71eb Mon Sep 17 00:00:00 2001 From: Aaron Murray Date: Thu, 2 Nov 2023 06:48:46 -0500 Subject: [PATCH] check if trying to install inside Docker or LXC and exit --- install | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/install b/install index 45ab243..b2bbcdc 100755 --- a/install +++ b/install @@ -15,7 +15,7 @@ # logfile="omv_install.log" -version="2.0.0" +version="2.0.1" _log() @@ -56,6 +56,16 @@ if [ ! -L "/sbin" ] || [ ! -L "/bin" ]; then exit 102 fi +if [ -f "/.dockerenv" ]; then + echo "Docker detected. OMV does not work in Docker!" + exit 103 +fi + +if grep -q 'machine-lxc' /proc/1/cgroup; then + echo "LXC detected. OMV does not work in LXC!" + exit 104 +fi + declare -i armbian=0 declare -i cfg=0 declare -i ipv6=0