Date: Thu, 5 Sep 2002 16:50:04 -0700 (PDT) From: Alex Vasylenko <lxv@a-send-pr.sink.omut.org> To: freebsd-bugs@FreeBSD.org Subject: Re: conf/41570: Sendmail hoststat cleaning error Message-ID: <200209052350.g85No47P017036@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR conf/41570; it has been noted by GNATS. From: Alex Vasylenko <lxv@a-send-pr.sink.omut.org> To: freebsd-gnats-submit@FreeBSD.org Cc: Subject: Re: conf/41570: Sendmail hoststat cleaning error Date: Thu, 5 Sep 2002 16:49:38 -0700 --EuxKj2iCbKjpUGkD Content-Type: text/plain; charset=us-ascii Content-Disposition: inline HostStatusDirectory is a configurable option in sendmail, so 150.clean-hoststat shouldn't blindly expect it to be /var/spool/.hoststat, besides HostStatusDirectory is relative to /var/spool/mqueue. The default location seems to be /var/spool/mqueue/.hoststat (see /usr/src/contrib/sendmail/cf/m4/proto.m4) I suggest we make the directory location configurable via periodic.conf Please see attached patches. --Alex. --EuxKj2iCbKjpUGkD Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="patch-150.clean-hoststat" --- 150.clean-hoststat Mon Aug 12 04:09:01 2002 +++ 150.clean-hoststat.new Thu Sep 5 16:13:12 2002 @@ -2,7 +2,7 @@ # # $FreeBSD: src/etc/periodic/daily/150.clean-hoststat,v 1.6 2002/08/12 11:09:01 schweikh Exp $ # -# Remove stale files in /var/spool/.hoststat +# Remove stale files from host status directory # # If there is a global system configuration file, suck it in. @@ -18,13 +18,13 @@ echo '$daily_clean_hoststat_enable is enabled but' \ '$daily_clean_hoststat_days is not set' rc=2 - elif [ ! -d /var/spool/.hoststat ]; then + elif [ ! -d $daily_clean_hoststat_dir ]; then echo '$daily_clean_hoststat_enable is enabled but' \ - "/var/spool/.hoststat doesn't exist" + "$daily_clean_hoststat_dir doesn't exist" rc=2 else echo "" - echo "Removing stale files from /var/spool/.hoststat:" + echo "Removing stale files from $daily_clean_hoststat_dir:" case "$daily_clean_hoststat_verbose" in [Yy][Ee][Ss]) @@ -33,8 +33,8 @@ print=;; esac - if [ -d /var/spool/.hoststat ]; then - cd /var/spool/.hoststat + if [ -d $daily_clean_hoststat_dir ]; then + cd $daily_clean_hoststat_dir rc=$(find . ! -name . -mtime +$daily_clean_hoststat_days \ -delete $print | tee /dev/stderr | wc -l) [ -z "$print" ] && rc=0 --EuxKj2iCbKjpUGkD Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="patch-periodic.conf" --- periodic.conf Fri Aug 9 13:58:54 2002 +++ periodic.conf.new Thu Sep 5 15:57:58 2002 @@ -62,6 +62,7 @@ # 150.clean-hoststat daily_clean_hoststat_enable="YES" # Delete .hoststat daily daily_clean_hoststat_days=3 # If not modified for +daily_clean_hoststat_dir="/var/spool/mqueue/.hoststat" # Host status directory daily_clean_hoststat_verbose="YES" # Mention files deleted # 200.backup-passwd --EuxKj2iCbKjpUGkD-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200209052350.g85No47P017036>