init-storage: Skip fs relabel w/o SELinux
If SELinux support is not available or enabled, attempting to relabel files will fail.
This commit is contained in:
@@ -89,6 +89,9 @@ partition_number() {
|
||||
}
|
||||
|
||||
relabel_all() {
|
||||
if [ ! "$(command -v selinuxenabled)" ] || !selinuxenabled; then
|
||||
return 0
|
||||
fi
|
||||
selinuxtype=$(. /etc/selinux/config && echo ${SELINUXTYPE})
|
||||
find "${tmpdir}" | \
|
||||
setfiles \
|
||||
|
||||
Reference in New Issue
Block a user