Prevent restorecon from failing if destination path doesn't exist.
This commit is contained in:
parent
ea092330f9
commit
972746ef64
1 changed files with 1 additions and 1 deletions
|
@ -107,7 +107,7 @@ define selinux::boolean($value) {
|
|||
#
|
||||
define selinux::manage_fcontext($type) {
|
||||
|
||||
exec { "semanage fcontext -a -t '${type}' '${name}' && restorecon -R `echo '${name}' | sed -e 's/(.*$//'`":
|
||||
exec { "semanage fcontext -a -t '${type}' '${name}' && restorecon -iR `echo '${name}' | sed -e 's/(.*$//'`":
|
||||
path => "/bin:/usr/bin:/sbin:/usr/sbin",
|
||||
unless => "matchpathcon `echo '${name}' | sed -e 's/(.*$//'` | egrep -q ':${type}(:s[0-9]*)?$'",
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue