[Bug 270266] Make periodic(8) diff output as small is possible

From: <bugzilla-noreply_at_freebsd.org>
Date: Thu, 16 Mar 2023 11:06:25 UTC

            Bug ID: 270266
           Summary: Make periodic(8) diff output as small is possible
           Product: Base System
           Version: 12.4-RELEASE
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: conf
          Assignee: bugs@FreeBSD.org
          Reporter: michael.osipov@siemens.com

Some periodic scripts use diff(1) to show differences:
# grep -r "diff " /etc/periodic
/etc/periodic/daily/221.backup-gpart:                   [ -n "$show_diff" ] &&
diff "${file}.bak" "${file}.tmp"
/etc/periodic/daily/210.backup-aliases:         diff -u $bak/aliases.bak
/etc/periodic/daily/200.backup-passwd:          diff -uI '^#'
$bak/master.passwd.bak /etc/master.passwd |\
/etc/periodic/daily/200.backup-passwd:          diff -u $bak/group.bak
/etc/periodic/daily/222.backup-gmirror:                 [ -n "$show_diff" ] &&
diff "${file}.bak" "${file}.tmp"
/etc/periodic/daily/223.backup-zfs:                     [ -n "$show_diff" ] &&
diff "${file}.bak" "${file}.tmp"
/etc/periodic/security/200.chkmounts:     check_diff mount - "${host} changes
in mounted filesystems:"
/etc/periodic/security/510.ipfdenied:     check_diff new_only ipf ${TMP}
"${host} ipf denied packets:"
/etc/periodic/security/700.kernelmsg:       check_diff new_only dmesg -
"${host} kernel log messages:"
/etc/periodic/security/100.chksetuid:   check_diff setuid - "${host} setuid
/etc/periodic/security/610.ipf6denied:   check_diff new_only ipf6 ${TMP}
"${host} ipf6 denied packets:"
/etc/periodic/security/security.functions:    diff
${security_status_diff_flags} ${LOG}/${label}.today \
/etc/periodic/security/520.pfdenied:            check_diff new_only pf ${TMP}
"${host} pf denied packets:"
/etc/periodic/security/500.ipfwdenied:    check_diff new_only ipfw ${TMP}
"${host} ipfw denied packets:"

To reduce email output it should use "-U 0" by default to omit unaffected lines
in the diffed files.

You are receiving this mail because:
You are the assignee for the bug.