Description of Problem:
[root@mule valhalla]# rpm -q mrtg --scripts
postinstall scriptlet (through /bin/sh):
if ! grep '* * * * root /usr/bin/mrtg' /etc/crontab > /dev/null; then
echo "" >> /etc/crontab
echo "0-59/5 * * * * root /usr/bin/mrtg /etc/mrtg/mrtg.cfg" >> /etc/crontab
Why must crontab be appended to? How about simply creating a file in
/etc/cron.d/ (just like we do with the sysstat file)?
Version-Release number of selected component (if applicable):
This behavior of modifying /etc/crontab has another undesirable effect in that
if one runs mrtg daemonized (with the "RunAsDaemon: y" in the mrtg.cfg file),
this is unneeded and produces undesirable results. Also, running daemonized
with a config file other than /etc/mrtg.cfg results in conflicts between the
daemonized version and the crontab runs, especially if the RedHat-expected
/etc/mrtg.cfg isn't the same as the daemonized version's config file.
My bottom line is that there should be no assumption in this package that this
is to be run from crontab. This causes nothing but grief for those of us
running mrtg daemonized.
*** This bug has been marked as a duplicate of 51812 ***