File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change 39
39
if $managed_dirs {
40
40
$managed_dirs .each | $entry | {
41
41
$dir = $options [' mysqld' ][" ${entry} " ]
42
+
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
+
43
47
exec { "${entry}-managed_dir-mkdir" :
44
- command => " /bin/mkdir -p ${dir} " ,
45
- 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 ]] ,
46
50
notify => Exec[" ${entry} -managed_dir-chmod" ],
47
51
}
52
+
48
53
exec { "${entry}-managed_dir-chmod" :
49
- command => " /bin/chmod 777 ${dir} " ,
54
+ command => [ ' /bin/chmod' , ' 777' , $clean_dir ] ,
50
55
refreshonly => true ,
51
56
}
52
57
}
You can’t perform that action at this time.
0 commit comments