diff options
Diffstat (limited to 'functions')
-rw-r--r-- | functions | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/functions b/functions index 17850e2..037cd08 100644 --- a/functions +++ b/functions @@ -28,11 +28,8 @@ emergency_shell() { } detect_virt() { - # Detect LXC containers - [ ! -e /proc/self/environ ] && return - if grep -q lxc /proc/self/environ >/dev/null; then - export VIRTUALIZATION=1 - fi + # Detect LXC (and other) containers + [ -z "${container+x}" ] || export VIRTUALIZATION=1 } deactivate_vgs() { |