summaryrefslogtreecommitdiff
path: root/cloudinit/config/cc_apt_pipelining.py
diff options
context:
space:
mode:
authorharlowja <harlowja@virtualbox.rhel>2012-06-21 09:12:16 -0700
committerharlowja <harlowja@virtualbox.rhel>2012-06-21 09:12:16 -0700
commit0c83ff5cb81b6de3028cf90e7dd6aba565682dbf (patch)
treea499408fa70a248b32f0e82e36b9ae893dce46e9 /cloudinit/config/cc_apt_pipelining.py
parent64f1347cb8f2580339d539b7772e7872ed81cae9 (diff)
downloadvyos-cloud-init-0c83ff5cb81b6de3028cf90e7dd6aba565682dbf.tar.gz
vyos-cloud-init-0c83ff5cb81b6de3028cf90e7dd6aba565682dbf.zip
1. Renames for debug message from 'transform' to 'module'
2. Fixing up more cloud.path.joins found to use the right ro/rw filename
Diffstat (limited to 'cloudinit/config/cc_apt_pipelining.py')
-rw-r--r--cloudinit/config/cc_apt_pipelining.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/cloudinit/config/cc_apt_pipelining.py b/cloudinit/config/cc_apt_pipelining.py
index f460becb..3426099e 100644
--- a/cloudinit/config/cc_apt_pipelining.py
+++ b/cloudinit/config/cc_apt_pipelining.py
@@ -25,6 +25,9 @@ distros = ['ubuntu', 'debian']
DEFAULT_FILE = "/etc/apt/apt.conf.d/90cloud-init-pipelining"
+APT_PIPE_TPL = ("//Written by cloud-init per 'apt_pipelining'\n"
+ 'Acquire::http::Pipeline-Depth "%s";\n')
+
# Acquire::http::Pipeline-Depth can be a value
# from 0 to 5 indicating how many outstanding requests APT should send.
# A value of zero MUST be specified if the remote host does not properly linger
@@ -49,8 +52,7 @@ def handle(_name, cfg, cloud, log, _args):
def write_apt_snippet(cloud, setting, log, f_name):
""" Writes f_name with apt pipeline depth 'setting' """
- file_contents = ("//Written by cloud-init per 'apt_pipelining'\n"
- 'Acquire::http::Pipeline-Depth "%s";\n') % (setting)
+ file_contents = APT_PIPE_TPL % (setting)
util.write_file(cloud.paths.join(False, f_name), file_contents)