Date: Mon, 26 Nov 2001 20:00:40 -0800 From: Gregory Neil Shapiro <gshapiro@FreeBSD.org> To: Mike Silbersack <silby@silby.com> Cc: <cvs-committers@FreeBSD.org>, <cvs-all@FreeBSD.org> Subject: Re: cvs commit: src/etc security Message-ID: <15363.4072.353022.489319@horsey.gshapiro.net> In-Reply-To: <20011126213416.J31506-100000@achilles.silby.com> References: <15362.63897.444387.12844@horsey.gshapiro.net> <20011126213416.J31506-100000@achilles.silby.com>
next in thread | previous in thread | raw e-mail | index | archive | help
silby> Heh, that seems to set $who to "OPTARG". Closer, but not quite silby> there yet. :) Missed a $. I'll try it when I get home from work, but here is another attempt (lightly tested this time): --- 450.status-security~orig Mon Nov 26 18:20:40 2001 +++ 450.status-security Mon Nov 26 18:21:36 2001 @@ -36,6 +36,7 @@ >$daily_status_security_output 2>&1;; *) echo " (output mailed separately)" + args="-t $daily_status_security_output $args" sh /etc/security $args 2>&1 | sendmail $daily_status_security_output;; esac;; --- security~orig Mon Nov 26 18:20:45 2001 +++ security Mon Nov 26 18:23:53 2001 @@ -47,18 +47,19 @@ } sflag=FALSE ignore= -while getopts as c +while getopts ast: c do case "$c" in a) ignore="$ignore|^amd:";; s) sflag=TRUE;; + t) who=$OPTARG ;; esac done yesterday=`date -v-1d "+%b %e "` host=`hostname` -[ $sflag = FALSE ] && echo "To: root@${host}" +[ "$who" != "" ] && echo "To: ${who}" [ $sflag = FALSE ] && echo "Subject: ${host} security check output" umask 027 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?15363.4072.353022.489319>