> The problem is not configuring the system, but re-configuring the
> system. Then again your complaint is valid to for all programs not
> compiled down to machine code. Things like mrtg has to be parsed,
> interpreted. Even C code has to be linked to runtime every time it
> runs even if nothing ch
On Wed, Nov 09, 2011 at 08:55:58AM -0700, James wrote:
> grep '^[[:space:]]WorkDir' /etc/mrtg.cfg
grep '^[[:space:]]*WorkDir' /etc/mrtg.cfg
should work
> Of course, the idea of running all of
>
> if [ -x /usr/bin/mrtg ] && \
> [ -r /etc/mrtg.cfg ] && \
> [ -d "$(grep ^W
> WorkDir
>
> and it won't get recognized...
My mistake - how about
grep '^[ \t]*WorkDir' /etc/mrtg.cfg
or
grep '^[[:space:]]WorkDir' /etc/mrtg.cfg
or
grep '[^#].*WorkDir' /etc/mrtg.cfg
Whatever - grep does not need to be run twice.
Of course, the idea of run
On Wed, Nov 9, 2011 at 03:11, James wrote:
>> /etc/cron.d/mrtg changed:
>> */5 * * * * root if [ -x /usr/bin/mrtg ] && [ -r /etc/mrtg.cfg ] && [
>> -d "$(grep -v '^#' /etc/mrtg.cfg | grep WorkDir | cut
>> -d' ' -f2)" ]; then mkdir -p /var/log/mrtg ; env LANG=C /usr/bin/mrtg
>> /etc/mrtg.cfg
> /etc/cron.d/mrtg changed:
> */5 * * * * rootif [ -x /usr/bin/mrtg ] && [ -r /etc/mrtg.cfg ] && [ -d
> "$(grep -v '^#' /etc/mrtg.cfg | grep WorkDir | cut
> -d' ' -f2)" ]; then mkdir -p /var/log/mrtg ; env LANG=C /usr/bin/mrtg
> /etc/mrtg.cfg 2>&1 | tee -a /var/log/mrtg/mrtg.log ; fi
Also
Package: mrtg
Version: 2.17.2-1
Severity: normal
Dear Maintainer,
The cron file look for a WorkDir in config file before actually running
mrtg.
The problem is it do not ignore commented lines, and thus the test fail
and prevent mrtg from running.
In my cron file below I added a "grep -v ^#" in or
6 matches
Mail list logo