From owner-svn-src-user@FreeBSD.ORG Sun Nov 3 08:51:27 2013 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id CA9D9CF6; Sun, 3 Nov 2013 08:51:27 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 9E0F3246F; Sun, 3 Nov 2013 08:51:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA38pRgm088176; Sun, 3 Nov 2013 08:51:27 GMT (envelope-from cperciva@svn.freebsd.org) Received: (from cperciva@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA38pRB9088175; Sun, 3 Nov 2013 08:51:27 GMT (envelope-from cperciva@svn.freebsd.org) Message-Id: <201311030851.rA38pRB9088175@svn.freebsd.org> From: Colin Percival Date: Sun, 3 Nov 2013 08:51:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r257564 - user/cperciva/panicmail X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Nov 2013 08:51:27 -0000 Author: cperciva Date: Sun Nov 3 08:51:27 2013 New Revision: 257564 URL: http://svnweb.freebsd.org/changeset/base/257564 Log: Style fixes. Submitted by: dt71 Modified: user/cperciva/panicmail/panicmail Modified: user/cperciva/panicmail/panicmail ============================================================================== --- user/cperciva/panicmail/panicmail Sun Nov 3 07:31:54 2013 (r257563) +++ user/cperciva/panicmail/panicmail Sun Nov 3 08:51:27 2013 (r257564) @@ -30,7 +30,7 @@ . /etc/rc.subr name="panicmail" -rcvar=panicmail_enable +rcvar="panicmail_enable" start_cmd="panicmail_run" stop_cmd=":" @@ -51,6 +51,8 @@ panicmail_gather() kgdb -q `sysctl -n kern.bootfile` "${dumpdir}/vmcore.$1" \ < ${tmpfile} >> "${dumpdir}/panicmail.$1" 2> /dev/null echo >> "${dumpdir}/panicmail.$1" + + # Remove the temporary file. rm ${tmpfile} } @@ -67,7 +69,7 @@ panicmail_encrypt() lam -s '|' ${tmpfile} -s '|' >> "${dumpdir}/panicmail.$1.enc" echo "-----ENCRYPTED FREEBSD PANIC DATA ENDS HERE-----------------------" >> "${dumpdir}/panicmail.$1.enc" - # Remove temporary file. + # Remove the temporary file. rm ${tmpfile} } @@ -97,7 +99,7 @@ panicmail_root() ${panicmail_sendto}; you should be able to do this by hitting "Reply" in your mail client and removing everything up to this point. - + EOF cat "${dumpdir}/panicmail.$1.enc" } @@ -124,7 +126,7 @@ panicmail_run() # Quit if we have no dumps. if ! [ -f "${dumpdir}/bounds" ]; then - return 0; + return 0 fi # If we have info.last, use that to figure out the last dump number. @@ -132,20 +134,20 @@ panicmail_run() nr=`readlink ${dumpdir}/info.last` nr=${nr##*.} else - # Otherwise get the number from bounds. + # Otherwise, get the number from bounds. nr=$((`cat ${dumpdir}/bounds` - 1)) fi # Make sure the dump actually exists. if ! [ -f "${dumpdir}/info.${nr}" ] || ! [ -f "${dumpdir}/vmcore.${nr}" ]; then - return 0; + return 0 fi # Have we already sent an email about this one? We compare times in # order to catch the case where dump numbers repeat. if [ "${dumpdir}/panicmail.${nr}" -nt "${dumpdir}/vmcore.${nr}" ]; then - return 0; + return 0 fi # Gather information about this panic.