]> gitweb.fluxo.info Git - puppet-apt.git/commitdiff
Quote apt-key variable parameter.
authorintrigeri <intrigeri@boum.org>
Mon, 31 Aug 2015 09:55:17 +0000 (09:55 +0000)
committerintrigeri <intrigeri@boum.org>
Mon, 31 Aug 2015 09:55:17 +0000 (09:55 +0000)
This is not perfect protection against special chars that the shell may
interpret, but should help at least in case $name contains spaces.

manifests/key/plain.pp

index a24a51b87c0f7e9da434e43fbb0f0aab7f0d5908..e4a2f899fa5e15fc0856e14cac0362a382ae328d 100644 (file)
@@ -5,7 +5,7 @@ define apt::key::plain ($source) {
     "${apt::apt_base_dir}/keys":
       ensure  => directory;
   }
-  exec { "apt-key add ${apt::apt_base_dir}/keys/${name}":
+  exec { "apt-key add '${apt::apt_base_dir}/keys/${name}'":
     subscribe   => File["${apt::apt_base_dir}/keys/${name}"],
     refreshonly => true,
     notify      => Exec['refresh_apt'],