Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 16 May 2001 09:19:59 +0200 (CEST)
From:      kheuer@gwdg.de
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   bin/27375: /usr/sbin/periodic does not set mail subject correctly
Message-ID:  <200105160719.f4G7Jxl16086@gwdu60.gwdg.de>

next in thread | raw e-mail | index | archive | help

>Number:         27375
>Category:       bin
>Synopsis:       /usr/sbin/periodic does not set mail subject correctly
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed May 16 00:30:01 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     kheuer@gwdg.de
>Release:        FreeBSD 4.3-STABLE i386
>Organization:
GWDG
>Environment:
System: FreeBSD gwdu60.gwdg.de 4.3-STABLE FreeBSD 4.3-STABLE #1: Mon May 14 15:54:42 CEST 2001 kheuer@gwdu57.gwdg.de:/usr/obj/usr/src/sys/GWDU60 i386
>Description:
	Formerly, the scripts run periodically (daily, weekly, monthly)
	sent mail to root with a subject line containing host name
	and script name (daily, weekly, monthly).
	This is extremly useful when forwarding this mail messages from
	different hosts to one address.
	Now (I guess at less since 4.2) the mail does not contain
	a subject line.
>How-To-Repeat:
	Look at the daily mail or run one of the peridioc commands in
	/etc/crontab, e.g.:
	periodic daily 2>&1 | sendmail root
>Fix:

*** /usr/sbin/periodic  Wed May 16 08:57:10 2001
--- /usr/src/usr.sbin/periodic/periodic.sh      Mon Dec 11 10:25:36 2000
***************
*** 39,45 ****
      eval output=\$${arg##*/}_output
      case "$output" in
      /*) pipe="cat >>$output";;
!     "") echo "Subject: $host $arg run output"; pipe=cat;;
      *)  pipe="mail -s '$host ${arg##*/} run output' $output";;
      esac
  
--- 39,45 ----
      eval output=\$${arg##*/}_output
      case "$output" in
      /*) pipe="cat >>$output";;
!     "") pipe=cat;;
      *)  pipe="mail -s '$host ${arg##*/} run output' $output";;
      esac
>Release-Note:
>Audit-Trail:
>Unformatted:

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?200105160719.f4G7Jxl16086>