Ticket #1479 (closed defect: fixed)

Opened 4 months ago

Last modified 2 months ago

Use cmp instead of diff (at least for the logs)

Reported by: aseques Assigned to:
Priority: major Milestone: ispCP ω 1.0.0 - RC7
Component: Backend (Engine) Version: ispCP ω 1.0.0 - RC6
Severity: Easy Keywords:
Cc:

Description

When checking for the mail logs the perl script uses a diff -q -a
Everytime the message "Files /var/log/ispcp/mail.log and /var/log/ispcp/mail.log.prev differ" gets logged and if you have an aliase for the root messages, your mailbox will get crowded of those messages. Since the only thing being done is the comparition. Instead of diff, it would be better to use cmp -s
cmp is part of the same package, so it doesn't introduce new dependencies, and would allow for an easier track of system problems.

The workaround would be to >/dev/null the result, but the moment there's a real problem, you wouldn't notice.

Attachments

cmp_patch.txt (0.9 kB) - added by aseques on 09/19/08 16:48:41.
Patch to change diff for cmd to silently compare files

Change History

09/19/08 16:48:41 changed by aseques

  • attachment cmp_patch.txt added.

Patch to change diff for cmd to silently compare files

09/19/08 16:54:33 changed by aseques

Doing a replace ispcp-vrl-traff

:%s/CMD_DIFF'} -a -q/CMD_CMP'} -s/gc

And adding CMD_CMP into ispcp.conf, there are no more messages like in the mail account aliased to root.

Files /var/log/ispcp/mail.log and /var/log/ispcp/mail.log.prev differ

09/30/08 21:27:02 changed by scitech

  • status changed from new to closed.
  • resolution set to fixed.
  • severity changed from Don't know to Easy.
  • milestone changed from Working to ispCP ω 1.0.0.

Thank you. Added in r1363


Add/Change #1479 (Use cmp instead of diff (at least for the logs))




Action