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/patches/systemd_detect_virt.patch | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 debian/patches/systemd_detect_virt.patch (limited to 'debian/patches/systemd_detect_virt.patch') diff --git a/debian/patches/systemd_detect_virt.patch b/debian/patches/systemd_detect_virt.patch new file mode 100644 index 00000000..32961a20 --- /dev/null +++ b/debian/patches/systemd_detect_virt.patch @@ -0,0 +1,29 @@ +Description: Use systemd-detect-virt to detect a container. running-in-container is an Ubuntu-ism and going away. +Author: Martin Pitt +Forwarded: https://code.launchpad.net/~pitti/cloud-init/systemd-detect-virt/+merge/284278 +Bug-Ubuntu: https://launchpad.net/bugs/1539016 + +Index: cloud-init-0.7.7~bzr1156/cloudinit/util.py +=================================================================== +--- cloud-init-0.7.7~bzr1156.orig/cloudinit/util.py ++++ cloud-init-0.7.7~bzr1156/cloudinit/util.py +@@ -76,7 +76,9 @@ FALSE_STRINGS = ('off', '0', 'no', 'fals + + + # Helper utils to see if running in a container +-CONTAINER_TESTS = ('running-in-container', 'lxc-is-container') ++CONTAINER_TESTS = (['systemd-detect-virt', '--quiet', '--container'], ++ ['running-in-container'], ++ ['lxc-is-container']) + + + def decode_binary(blob, encoding='utf-8'): +@@ -1749,7 +1751,7 @@ def is_container(): + try: + # try to run a helper program. if it returns true/zero + # then we're inside a container. otherwise, no +- subp([helper]) ++ subp(helper) + return True + except (IOError, OSError): + pass -- cgit v1.2.3