From db14db8479423b1e0288240c70404b0c60a6982f Mon Sep 17 00:00:00 2001 From: Alan Jenkins Date: Mon, 23 Jan 2017 12:10:06 +0000 Subject: [PATCH] selinux-autorelabel: remove incorrect redirection to /dev/null This code is currently incorrect. Currently redirecting `fixfiles` to /dev/null will have very little effect. Two messages will be suppressed, but both the percentage progress indicator, and any errors from the setfiles/restorecon binary will still be shown. The fact that fixfiles redirected its log output to stdin (!) was purely an implementation artefact. It was used to write log messages even inside shell functions whose output is captured e.g. `RESULT=$(shell_func)`. When fixfiles is fixed to support output redirection normally, this code would now behave incorrectly. It would suppress all percentage progress messages for this long-running process. Signed-off-by: Alan Jenkins --- selinux-autorelabel | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/selinux-autorelabel b/selinux-autorelabel index ad92022..ba72754 100755 --- a/selinux-autorelabel +++ b/selinux-autorelabel @@ -29,7 +29,7 @@ relabel_selinux() { FORCE=`cat /.autorelabel` [ -x "/usr/sbin/quotaoff" ] && /usr/sbin/quotaoff -aug - /sbin/fixfiles $FORCE restore > /dev/null 2>&1 + /sbin/fixfiles $FORCE restore fi rm -f /.autorelabel /usr/lib/dracut/dracut-initramfs-restore