Run autorelabel in parallel by default

https://fedoraproject.org/wiki/Changes/SELinux_Parallel_Autorelabel
This commit is contained in:
Petr Lautrbach 2022-07-27 11:21:12 +02:00
parent 2a7fa6a48c
commit 24691294b1

View File

@ -51,9 +51,15 @@ relabel_selinux() {
echo $"*** Relabeling could take a very long time, depending on file"
echo $"*** system size and speed of hard drives."
FORCE=`cat /.autorelabel`
[ -x "/usr/sbin/quotaoff" ] && /usr/sbin/quotaoff -aug
/sbin/fixfiles $FORCE restore
OPTS=`cat /.autorelabel`
# by default, use as many threads as there are available
# another -T X in $OPTS will override the default value
OPTS="-T 0 $OPTS"
[ -x "/usr/sbin/quotaoff" ] && /usr/sbin/quotaoff -aug
echo
echo $"Running: /sbin/fixfiles $OPTS restore"
/sbin/fixfiles $OPTS restore
fi
rm -f /.autorelabel