From c124df61aee24e182d33156ec465a101c01fc07a Mon Sep 17 00:00:00 2001 From: Manoj Srivastava Date: Mon, 26 Mar 2012 17:33:17 +0200 Subject: [PATCH] policycoreutils: Only run setfiles if we found read-write filesystems to run it on Only run setfiles if we have a R/W filesystem Signed-off-by: Laurent Bigonville Signed-off-by: Eric Paris Acked-by: Dan Walsh --- policycoreutils/scripts/fixfiles | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/policycoreutils/scripts/fixfiles b/policycoreutils/scripts/fixfiles index 27dcccfb..9f6a9492 100755 --- a/policycoreutils/scripts/fixfiles +++ b/policycoreutils/scripts/fixfiles @@ -234,7 +234,12 @@ then done FC=$TEMPFCFILE fi -${SETFILES} -q ${SYSLOGFLAG} ${FORCEFLAG} $* ${FC} ${FILESYSTEMSRW} 2>&1 | cat >> $LOGFILE +if [ -n "${FILESYSTEMSRW}" ]; then + echo "Relabeling `echo ${FILESYSTEMSRW}`" + ${SETFILES} -q ${SYSLOGFLAG} ${FORCEFLAG} $* ${FC} ${FILESYSTEMSRW} 2>&1 | cat >> $LOGFILE +else + echo >&2 "fixfiles: No suitable file systems found" +fi rm -rf /tmp/gconfd-* /tmp/pulse-* /tmp/orbit-* $TEMPFCFILE UNDEFINED=`get_undefined_type` || exit $?