policycoreutils/fixfiles: Force full relabel when SELinux is disabled
The previous check used getfilecon to check whether / slash contains a label, but getfilecon fails only when SELinux is disabled. Therefore it's better to check this using selinuxenabled. Signed-off-by: Petr Lautrbach <plautrba@redhat.com>
This commit is contained in:
parent
d3a8fc4c03
commit
f4e741a144
1 changed files with 2 additions and 2 deletions
|
@ -313,8 +313,8 @@ case "$1" in
|
|||
> /.autorelabel || exit $?
|
||||
[ -z "$FORCEFLAG" ] || echo -n "$FORCEFLAG " >> /.autorelabel
|
||||
[ -z "$BOOTTIME" ] || echo -N $BOOTTIME >> /.autorelabel
|
||||
# Force full relabel if / does not have a label on it
|
||||
getfilecon / > /dev/null 2>&1 || echo -F >/.autorelabel
|
||||
# Force full relabel if SELinux is not enabled
|
||||
selinuxenabled || echo -F > /.autorelabel
|
||||
echo "System will relabel on next boot"
|
||||
;;
|
||||
*)
|
||||
|
|
Loading…
Reference in a new issue