tmp cleanup

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

 



Hello,

I've not contributed directly to Fedora before, but have a small change I'd like to make.  I think this is the place to find out more about doing that.

I'd like a hook in rc.sysinit to do local /tmp cleanup on boot.  I already do things like this all the time on my system, but:
  1. Every time I update, if the original file changed, and is updated, the update is rpmsave (or similar), and I then need to compare versions every time.
  2. Every time I reinstall (usually once a year) I have to go back an re-edit a core system file (and then see (1) above sometime later).
  3. I think others have messy /tmp directories too.
The change to rc.sysinit is these three lines (although it would have to be different if merged into the distribution, this is just what's in mine now):
if [ -x /usr/local/bin/tmpcleanup ]; then
        /usr/local/bin/tmpcleanup
fi
  • The file 'tmpcleanup' merely creates a subdirectory in /tmp, based on the date/time, and moves everything currently in tmp into the new dir.
  • Exceptions are that it doesn't move files that appear to be prior dirs cleaned up already with tmpcleanup.
  • Again, nothing gets deleted, only moved, but it's easy to tell what files are almost certainly not needed anymore.
  • The script (only?) runs at system boot.
At least it helps me keep /tmp clean, or at least less cluttered.

Now, having said all that, I'd be happy to submit the tmpcleanup script (perl), I'd be happy to submit the changes to rc.sysinit, but how should I go about doing that?

I've not used CVS before, I don't know how to build RPM's.  I just run my system, and help with others, and thought I'd see about submitting a small change that helps me out.

My suspicion is that the best thing is to submit a change so that a directory is created, called "rc.sysinit.d" in /etc/rc.d, and in the rc.sysinit dir, create subdirectories that are called (much like rc1.d, etc) at certain points.  For instance, have a hook that is called when local filesystems are mounted.

But I might be getting ahead of myself with that.

My aim is to have one less thing to customize when I re-do a system.

Comments?

-Ron

-- 
fedora-devel-list mailing list
fedora-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/fedora-devel-list

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]
  Powered by Linux