check if trying to install inside Docker or LXC and exit

This commit is contained in:
Aaron Murray 2023-11-02 06:48:46 -05:00
parent f8c2562c02
commit 538f1cf8ea

12
install
View File

@ -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