check if trying to install inside Docker or LXC and exit

This commit is contained in:
Aaron Murray committed 2023-11-02 06:48:46 -05:00
1 parent f8c2562c02
commit 538f1cf8ea
1 file changed
+11 -1
+11 -1
View File
@@ -15,7 +15,7 @@
# #
logfile="omv_install.log" logfile="omv_install.log"
version="2.0.0" version="2.0.1"
_log() _log()
@@ -56,6 +56,16 @@ if [ ! -L "/sbin" ] || [ ! -L "/bin" ]; then
exit 102 exit 102
fi 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 armbian=0
declare -i cfg=0 declare -i cfg=0
declare -i ipv6=0 declare -i ipv6=0