From owner-freebsd-bugs Thu Sep 5 16:50:15 2002 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5D72837B400 for ; Thu, 5 Sep 2002 16:50:05 -0700 (PDT) Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id EE99243E4A for ; Thu, 5 Sep 2002 16:50:04 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.4/8.12.4) with ESMTP id g85No4JU017037 for ; Thu, 5 Sep 2002 16:50:04 -0700 (PDT) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.4/8.12.4/Submit) id g85No47P017036; Thu, 5 Sep 2002 16:50:04 -0700 (PDT) Date: Thu, 5 Sep 2002 16:50:04 -0700 (PDT) Message-Id: <200209052350.g85No47P017036@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org Cc: From: Alex Vasylenko Subject: Re: conf/41570: Sendmail hoststat cleaning error Reply-To: Alex Vasylenko Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org The following reply was made to PR conf/41570; it has been noted by GNATS. From: Alex Vasylenko 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