Red Hat Bugzilla – Bug 118871
add initscript to enable/disable running mrtg in cron job
Last modified: 2007-11-30 17:10:38 EST
Description of problem:
In a default install, mrtg is set to run from /etc/cron.d/mrtg. This
makes little sense until the admin sets up mrtg.
Version-Release number of selected component (if applicable):
Provide an initscript /etc/rc.d/init.d/mrtg (default to off) which
just toggles /var/lock/subsys/mrtg, and enhance /etc/cron.d/mrtg to
check for the existence of /var/lock/subsys/mrtg before running mrtg.
How about just checking that it's configured and having the cron job
Checking that it is configured would be tricky. /etc/mrtg/mrtg.conf
is shipped by default, and there is no easy way to tell if that file
is "configured". Yum uses the cronjob-check-subsys method. It would
be nice if the distro standardized on the same method.
Attaching proposed initscript and cron file, based on the ones from
the yum package.
Created attachment 98814 [details]
Created attachment 98815 [details]
Unlike yum, running unconfigured mrtg can do no harm.
mrtg is installed only if you explicitly select it in the interface,
in which case the administrator would probably prefer that it
"just works", or if you install 'Everything', in which case you
get what you deserve.