diff options
author | Mike Milner <mike.milner@canonical.com> | 2012-03-08 08:45:43 -0400 |
---|---|---|
committer | Mike Milner <mike.milner@canonical.com> | 2012-03-08 08:45:43 -0400 |
commit | 0334e553a80f48362e5f8fd3fd5bb2f43b2ca3ea (patch) | |
tree | 0511283170ebb1fc78d07261fd6535a3b2e174fd /cloudinit/CloudConfig | |
parent | 9f719a8c427f639e1f0ea6725073be3081dd008e (diff) | |
download | vyos-cloud-init-0334e553a80f48362e5f8fd3fd5bb2f43b2ca3ea.tar.gz vyos-cloud-init-0334e553a80f48362e5f8fd3fd5bb2f43b2ca3ea.zip |
Switch to using util.subp.
Diffstat (limited to 'cloudinit/CloudConfig')
-rw-r--r-- | cloudinit/CloudConfig/cc_ca_certs.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/cloudinit/CloudConfig/cc_ca_certs.py b/cloudinit/CloudConfig/cc_ca_certs.py index c7bacb78..3af6238a 100644 --- a/cloudinit/CloudConfig/cc_ca_certs.py +++ b/cloudinit/CloudConfig/cc_ca_certs.py @@ -16,7 +16,7 @@ import os from subprocess import check_call from cloudinit.util import (write_file, get_cfg_option_list_or_str, - delete_dir_contents) + delete_dir_contents, subp) CA_CERT_PATH = "/usr/share/ca-certificates/" CA_CERT_FILENAME = "cloud-init-ca-certs.crt" @@ -54,9 +54,8 @@ def remove_default_ca_certs(): delete_dir_contents(CA_CERT_PATH) delete_dir_contents(CA_CERT_SYSTEM_PATH) write_file(CA_CERT_CONFIG, "", mode=0644) - check_call([ - "echo 'ca-certificates ca-certificates/trust_new_crts select no' | " - "debconf-set-selections"], shell=True) + debconf_sel = "ca-certificates ca-certificates/trust_new_crts select no" + subp(('debconf-set-selections', '-'), debconf_sel) def handle(_name, cfg, _cloud, log, _args): |