From 2865eaceea68d592b03018d09c64f01fe3456a44 Mon Sep 17 00:00:00 2001 From: Scott Moser Date: Tue, 23 Aug 2016 16:48:38 -0400 Subject: Import version 0.7.7~bzr1156-0ubuntu2 Imported using git-dsc-commit. --- debian/cloud-init.postinst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'debian/cloud-init.postinst') 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 -- cgit v1.2.3