+# Check for LXC containers
+# http://www.freedesktop.org/wiki/Software/systemd/ContainerInterface
+# Added by Marc Fournier
+
+if [ -e "${root}/proc/1/environ" ] &&
+ cat "${root}/proc/1/environ" | tr '\000' '\n' | grep -Eiq '^container='; then
+ echo lxc
+fi
+