Date: Sun, 03 Nov 2013 18:59:26 -0800 From: Colin Percival <cperciva@freebsd.org> To: Jilles Tjoelker <jilles@stack.nl> Cc: freebsd-hackers@freebsd.org Subject: Re: Automated submission of kernel panic reports Message-ID: <52770D8E.2030906@freebsd.org> In-Reply-To: <20131103212950.GA22571@stack.nl> References: <526F8EB3.1040205@freebsd.org> <20131103212950.GA22571@stack.nl>
next in thread | previous in thread | raw e-mail | index | archive | help
On 11/03/13 13:29, Jilles Tjoelker wrote: > Some remarks about panicmail: > >> local tmpfile=`mktemp` || exit 1 > > This kind of thing does not do what you expect. The 'local' utility > returns 0 because it successfully created the local variable, ignoring > the status from the command substitution. Use > local tmpfile > tmpfile=`mktemp` || exit 1 > in both occurrences. Wow, I had no idea. I guess it never occurred to me that 'local' would even *have* an exit status... >> return 0; > > It would be better style to omit the redundant semicolon here (occurs > several times). Yes, that's already fixed (pointed out by dt71). > Some remarks about pkesh: > >> D=`mktemp -d "${TMP:-/tmp}/pkesh.XXXXXX"` > > I think the usual environment variable for the directory for temporary > files is TMPDIR, not TMP. Fixed. > The rest of the script uses $D mostly unquoted, unlike the change that > was made to panicmail. Fixed. -- Colin Percival Security Officer Emeritus, FreeBSD | The power to serve Founder, Tarsnap | www.tarsnap.com | Online backups for the truly paranoid
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?52770D8E.2030906>