Bug 123995 - change fixfiles to not delete fixfiles logfiles and to log changes
Summary: change fixfiles to not delete fixfiles logfiles and to log changes
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: policycoreutils
Version: 2
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Daniel Walsh
QA Contact: Ben Levenson
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2004-05-22 16:54 UTC by Tom London
Modified: 2007-11-30 22:10 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed: 2004-06-03 17:40:47 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Tom London 2004-05-22 16:54:23 UTC
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):
policycoreutils-1.11-2

How reproducible:
Always

Steps to Reproduce:
1. uhhh
2.
3.
    

Additional info:


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