mirror of
https://github.com/topjohnwu/selinux.git
synced 2024-11-28 05:50:30 +00:00
policycoreutils: fixfiles: remove useless use of cat
Don't force output through a pipe - let them access the TTY. When run interactively, this acts as a workaround for "Output of fixfiles gets garbled?" https://bugzilla.redhat.com/show_bug.cgi?id=1435894 E.g. it would also be useful if restorecon ever decides it doesn't want to output backspace characters on non-TTY outputs. Signed-off-by: Alan Jenkins <alan.christopher.jenkins@gmail.com>
This commit is contained in:
parent
1ac883f1bf
commit
5ed45797df
@ -243,17 +243,17 @@ FC=$TEMPFCFILE
|
||||
fi
|
||||
if [ ! -z "$RPMFILES" ]; then
|
||||
for i in `echo "$RPMFILES" | sed 's/,/ /g'`; do
|
||||
rpmlist $i | ${RESTORECON} $exclude_dirs ${FORCEFLAG} ${VERBOSE} $* -R -i -f - 2>&1 | cat >> $LOGFILE
|
||||
rpmlist $i | ${RESTORECON} $exclude_dirs ${FORCEFLAG} ${VERBOSE} $* -R -i -f - >>$LOGFILE 2>&1
|
||||
done
|
||||
exit $?
|
||||
fi
|
||||
if [ ! -z "$FILEPATH" ]; then
|
||||
${RESTORECON} $exclude_dirs ${FORCEFLAG} ${VERBOSE} -R $* -- "$FILEPATH" 2>&1 | cat >> $LOGFILE
|
||||
${RESTORECON} $exclude_dirs ${FORCEFLAG} ${VERBOSE} -R $* -- "$FILEPATH" >>$LOGFILE 2>&1
|
||||
return
|
||||
fi
|
||||
if [ -n "${FILESYSTEMSRW}" ]; then
|
||||
echo "${OPTION}ing `echo ${FILESYSTEMSRW}`"
|
||||
${SETFILES} ${VERBOSE} $exclude_dirs -q ${FORCEFLAG} $* ${FC} ${FILESYSTEMSRW} 2>&1 | cat >> $LOGFILE
|
||||
${SETFILES} ${VERBOSE} $exclude_dirs -q ${FORCEFLAG} $* ${FC} ${FILESYSTEMSRW} >>$LOGFILE 2>&1
|
||||
else
|
||||
echo >&2 "fixfiles: No suitable file systems found"
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user