We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 6f531ad + 1c1291d commit e70e7fdCopy full SHA for e70e7fd
manifests/server/config.pp
@@ -39,14 +39,19 @@
39
if $managed_dirs {
40
$managed_dirs.each | $entry | {
41
$dir = $options['mysqld']["${entry}"]
42
+
43
if ( $dir and $dir != '/usr' and $dir != '/tmp' ) {
44
+ $clean_dir = shell_escape($dir)
45
+ $clean_package_name = shell_escape($mysql::server::package_name)
46
47
exec { "${entry}-managed_dir-mkdir":
- command => "/bin/mkdir -p ${dir}",
- unless => "/usr/bin/dpkg -s ${mysql::server::package_name}",
48
+ command => ['/bin/mkdir', '-p', $clean_dir],
49
+ unless => [['/usr/bin/dpkg', '-s', $clean_package_name]],
50
notify => Exec["${entry}-managed_dir-chmod"],
51
}
52
53
exec { "${entry}-managed_dir-chmod":
- command => "/bin/chmod 777 ${dir}",
54
+ command => ['/bin/chmod', '777', $clean_dir],
55
refreshonly => true,
56
57
0 commit comments