LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Password
Red Hat This forum is for the discussion of Red Hat Linux.

Notices


Reply
  Search this Thread
Old 06-22-2006, 10:17 AM   #1
AndrewCAtWayofthebit
LQ Newbie
 
Registered: May 2006
Location: Little Rock, AR
Posts: 12

Rep: Reputation: 0
disabling anacrontab and rpm rebuilds


Does anyone know what rpm script generates these files?

/var/lib/rpm/__db.001
/var/lib/rpm/__db.002
/var/lib/rpm/__db.003


I think it is /etc/cron.daily/rpm.

Anyway, I want to disable anacrontab and move the three scripts it runs to cron. There is nothing wrong with doing that, right?

Stock anacrontab only runs cron.daily, cron.weekly and cron.monthly. All I should have to do is add lines to roots crontab to run these scripts daily/weekly/monthly, right? Something like:

0 19 * * * run-parts /etc/cron.daily
30 19 * * sun run-parts /etc/cron.weekly
0 20 1 * * run-parts /etc/cron.monthly


Thank you,
 
Old 06-24-2006, 06:14 AM   #2
blackhole54
Senior Member
 
Registered: Mar 2006
Posts: 1,896

Rep: Reputation: 61
This rpm discussion is based on my installation of RH 8.0:

The __db.00? files appear to be database files that the rpm command accesses for most operations, including the one in /etc/cron.daily/rpm. That script updates /var/log/rpmpkgs but does not modify the db files. Something appears to have modified these db files when I booted (based on timestamp), but I can't figure out what. You can look at the script with less or any text editor. Mine consists of the single line:
Code:
rpm -qa --qf %{name}-%{version}-%{release}.%{arch}.rpm\n' 2>&1 \
	| sort > /var/log/rpmpkgs
RH 8.0 (and probably whatever you are using) executes the daily/weekly/monthly scripts from both /etc/anacrontab and /etc/crontab. The first runs when you first boot and takes care of anything that was missed while the computer was off. The second runs during normal operation. If for some reason these are not already in crontab, you can certainly add them. However, if you remove them from anacrontab, when you boot, they won't get run until their next scheduled times in crontab.

I believe your second crontab line has some typos, but otherwise what you have listed is the correct format for crontab files for indivual users (including root), created with the crontab -e command. The /etc/crontab file uses a slightly different format:
Code:
0 19 * * * root run-parts /etc/cron.daily
30 19 * * 0 root run-parts /etc/cron.weekly
0 20 1 * * root run-parts /etc/cron.monthly
where the sixth field (in my example, root) shows which user the command is executed as.
 
Old 06-24-2006, 08:57 AM   #3
blackhole54
Senior Member
 
Registered: Mar 2006
Posts: 1,896

Rep: Reputation: 61
An update to my last post ...

IN RH 8.0, /etc/rc.d/rc.sysinit deletes those __db.00? files at boot time. Something else at boot time recreates them, but I still haven't figured out what. (I used grep -l rpm ... on everything in /etc/rc.d/init.d and /etc/rc.d and didn't discover anything.) When rpm is used with the query option (-q) -- and probably some others -- as root it will create those files if they do not already exist. So if you run /etc/cron.daily/rpm when those files are missing, it will create them. Otherwise it leaves them alone.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
counter part of "rpm -ivh --force kernel....rpm in slackware b0nd Slackware 2 01-28-2006 07:46 PM
rpm -Uvh does not work with header & rpm files in /var/spool/up2date jd_no7 Linux - Software 1 05-17-2004 05:24 PM
rpm error only says"rpm: relocation error: rpm: undefined symbol: poptAliasOptions" dlrsims Linux - Newbie 2 11-14-2003 09:22 PM
.src.rpm, .i386.rpm and .i686.rpm hhegab Linux - Software 2 06-19-2003 07:19 AM
vmware hates rebuilds DAChristen29 Linux - Software 3 01-19-2003 11:01 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat

All times are GMT -5. The time now is 07:39 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration