diff --git a/functions b/functions index 1aa7517a8a..4435f2de2f 100644 --- a/functions +++ b/functions @@ -666,7 +666,7 @@ function set_mtu { # running_in_container - Returns true otherwise false function running_in_container { - if grep -q lxc /proc/1/cgroup; then + if [[ $(systemd-detect-virt --container) == 'none' ]]; then return 0 fi