Bug 123995 - change fixfiles to not delete fixfiles logfiles and to log changes
change fixfiles to not delete fixfiles logfiles and to log changes
Product: Fedora
Classification: Fedora
Component: policycoreutils (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Daniel Walsh
Ben Levenson
: FutureFeature
Depends On:
  Show dependency treegraph
Reported: 2004-05-22 12:54 EDT by Tom London
Modified: 2007-11-30 17:10 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2004-06-03 13:40:47 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Tom London 2004-05-22 12:54:23 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040510

Description of problem:
Would be nice if 'fixfiles relabel' did not delete logfiles from
previous runs of fixfiles.

Also, would be nice if 'fixfiles relabel' recorded labeling changes to
logfile (OK if not sent to console).

Does it make sense to change the 'relabel()' fn in fixfiles from:
     relabel() {
     echo "Cleaning out /tmp"
     rm -rf /tmp/.??* /tmp/*
     ${SETFILES} ${FC} ${FILESYSTEMS} 2>&1 | tee $LOGFILE
 to something like:
     relabel() {
     echo "Cleaning out /tmp (saving previous fixfiles logs)"
     find /tmp -maxdepth 1 -mindepth 1 | grep -v /tmp/fixfiles | xargs
rm -rf 
     ${SETFILES} -v ${FC} ${FILESYSTEMS} 2>&1 | tee $LOGFILE | grep -v
 "/usr/sbin/setfiles: relabeling" }

(Notice the addition of the '-v' argument to ${SETFILES}).

This way the changes are logged (but not displayed on the console),
and previous log files are retained.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. uhhh

Additional info:

Note You need to log in before you can comment on or make changes to this bug.