Suggested 'minor enhancement' to fixfiles ... ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



'fixfiles relabel' cleans out /tmp, including log files from previous
runs of fixfiles.  (I had just run 'fixfiles check' and didn't expect
to lose the log!).

Also, 'fixfiles relabel' does not log changes....

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"
    }

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

tom
-- 
___________________________________________________________
Sign-up for Ads Free at Mail.com
http://promo.mail.com/adsfreejump.htm



[Index of Archives]     [Fedora Users]     [Fedora Desktop]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Campsites]     [KDE Users]     [Gnome Users]

  Powered by Linux