Date: Fri, 28 Jun 2002 03:50:04 -0700 (PDT) From: Peter Pentchev <roam@ringlet.net> To: freebsd-bugs@FreeBSD.org Subject: Re: bin/39940: /usr/sbin/periodic sends thousands of emails Message-ID: <200206281050.g5SAo40M000627@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR bin/39940; it has been noted by GNATS. From: Peter Pentchev <roam@ringlet.net> To: Guolin Cheng <guolin@alexa.com> Cc: bug-followup@FreeBSD.org Subject: Re: bin/39940: /usr/sbin/periodic sends thousands of emails Date: Fri, 28 Jun 2002 13:39:54 +0300 On Thu, Jun 27, 2002 at 05:28:21PM -0700, Guolin Cheng wrote: > > >Number: 39940 > >Category: bin > >Synopsis: /usr/sbin/periodic sends thousands of emails > >Originator: Guolin Cheng > >Release: FreeBSD 4.6, but same for all 4.* version > >Organization: > ALexa Internet. Inc. > >Environment: > FreeBSD rontmp.alexa.com 4.6-RELEASE FreeBSD 4.6-RELEASE #0: Fri Jun 21 20:37:42 GMT 2002 root@rontmp.alexa.com:/usr/src/sys/compile/ALEXA i386 > > >Description: > The problems are: > > 1, /usr/sbin/periodic sends tons of email, when running hourly running > scripts whether or not the latter generate outputs. Then email server > will be overwhelmed if we have hundreds or thousands FreeBSD boxes. This can be worked around easily: make your scripts return an appropriate exit code to periodic(8) as described in its manual page; notably, use an exit code of 0 for scripts that produce no output, and set the hourly_show_success variable to 'no' in /etc/periodic.conf. Actually, this is the way it is *designed* to work :) > 2, periodic can not tell normal shell scripts from backup files ended > with '~' and ',' , which are normally created by CVS/RVS/Perforce. it > tries to run all executable files under base directory specified. Uhm.. so.. don't leave any? :) In the case of source-controlled script directories, I usually keep my working copies somewhere else, and use the 'real' scripts dir only as a checked-out copy; since it is never modified, it should never create any conflicts, so no temporary/backup files should ever be created. > 3, the coufiguration file */periodic.conf, which contain variable > definition entries including <basedir>_{show|output|...}, will confuse > Bourne Shell interpreter when the basedir contains character '.', > which is normal for directory name but not appropriate for shell > variable name substitution. One might argue that this may be solved by the "Don't do that" approach.. An underscore character would serve just as well as a word separator in the directory name. G'luck, Peter -- Peter Pentchev roam@ringlet.net roam@FreeBSD.org PGP key: http://people.FreeBSD.org/~roam/roam.key.asc Key fingerprint FDBA FD79 C26F 3C51 C95E DF9E ED18 B68D 1619 4553 I am the meaning of this sentence. 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?200206281050.g5SAo40M000627>