Commit 4924ed5b authored by Vitaly Lipatov's avatar Vitaly Lipatov

distr_info: add systemd less checking for container type

parent 1c4d09e1
......@@ -926,6 +926,16 @@ get_virt()
echo "$VIRT" && return
fi
if [ "$UID" = 0 ] ; then
if grep -q "docker" /proc/1/environ; then
echo "docker" && return
elif grep -q "lxc" /proc/1/environ; then
echo "lxc" && return
elif grep -q "libpod" /proc/1/environ; then
echo "podman" && return
fi
fi
# TODO: use virt-what under root
# inspired by virt_what
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment