diff options
author | Scott Moser <smoser@ubuntu.com> | 2011-08-22 23:21:35 -0400 |
---|---|---|
committer | Scott Moser <smoser@ubuntu.com> | 2011-08-22 23:21:35 -0400 |
commit | a3373fb60aac7f3fee9ec28afebc0e55d28d5438 (patch) | |
tree | bf101eb0ace7c33862b0095411c740ac7b71e5f6 /cloudinit/CloudConfig | |
parent | 0b2656d39db427311266cee5b2ee013de2e56225 (diff) | |
download | vyos-cloud-init-a3373fb60aac7f3fee9ec28afebc0e55d28d5438.tar.gz vyos-cloud-init-a3373fb60aac7f3fee9ec28afebc0e55d28d5438.zip |
util.subp: do not attach stdin cloud-init's stdin to subprocesses (LP: 831505)
Fix issue where 'isatty' would return true for apt-add-repository.
It would get stdin which was attached to a terminal (/dev/console) and would
thus hang when running during boot.
This was done by changing all users of util.subp to have None input unless
input was given. In that case, the input will be the string passed in.
LP: #831505
Diffstat (limited to 'cloudinit/CloudConfig')
-rw-r--r-- | cloudinit/CloudConfig/cc_apt_update_upgrade.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/cloudinit/CloudConfig/cc_apt_update_upgrade.py b/cloudinit/CloudConfig/cc_apt_update_upgrade.py index 41c34bc3..495b8522 100644 --- a/cloudinit/CloudConfig/cc_apt_update_upgrade.py +++ b/cloudinit/CloudConfig/cc_apt_update_upgrade.py @@ -127,7 +127,7 @@ def add_sources(srclist, searchList={ }): source=ent['source'] if source.startswith("ppa:"): - try: util.subp(["add-apt-repository",source], "/dev/null") + try: util.subp(["add-apt-repository",source]) except: elst.append([source, "add-apt-repository failed"]) continue |