diff options
Diffstat (limited to 'debian/cloud-init.postinst')
-rw-r--r-- | debian/cloud-init.postinst | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/debian/cloud-init.postinst b/debian/cloud-init.postinst index c0d31d46..90277be0 100644 --- a/debian/cloud-init.postinst +++ b/debian/cloud-init.postinst @@ -162,9 +162,9 @@ fix_1336855() { [ "$(stat -c %d:%i /)" != "$(stat -c %d:%i /proc/1/root/.)" ] && return 0 # Check if we are in a container, i.e. LXC - for t in running-in-container lxc-is-container; do - command -v $t && $t && return 0 - done >/dev/null 2>&1 + if systemd-detect-virt --quiet --container || lxc-is-container 2>/dev/null; then + return 0 + fi # Find out where grub thinks the root device is. Only continue if # grub postinst would install/reinstall grub |