Module: VagrantPlugins::CaCertificates::Cap::Redhat

Defined in:
lib/vagrant-ca-certificates/cap/redhat/helpers.rb,
lib/vagrant-ca-certificates/cap/redhat/certificate_file_bundle.rb,
lib/vagrant-ca-certificates/cap/redhat/certificate_upload_path.rb,
lib/vagrant-ca-certificates/cap/redhat/update_certificate_bundle.rb

Defined Under Namespace

Modules: CertificateFileBundle, CertificateUploadPath, UpdateCertificateBundle

Class Method Summary collapse

Class Method Details

.legacy_certificate_bundle?(sh) ⇒ Boolean

HACK: All versions of EL5 and below EL6.5 do not have support for the ‘update-ca-trust` command and thus the bundles must be managed manually.

Returns:

  • (Boolean)


8
9
10
11
# File 'lib/vagrant-ca-certificates/cap/redhat/helpers.rb', line 8

def self.legacy_certificate_bundle?(sh)
  command = %q(R=$(sed -E "s/.* ([0-9])\.([0-9]+) .*/\\1.\\2/" /etc/redhat-release))
  sh.test(%Q(#{command} && [[ $R =~ ^5 || $R =~ ^6\.[0-4]+ ]]), shell: '/bin/bash') || !sh.test("rpm -q ca-certificates", shell:'/bin/bash')
end