Date: Tue, 05 Jan 2016 17:00:04 -0700 From: Ian Lepore <ian@freebsd.org> To: Warner Losh <imp@FreeBSD.org>, src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r293227 - head/etc Message-ID: <1452038404.1320.46.camel@freebsd.org> In-Reply-To: <201601052120.u05LKlQw074919@repo.freebsd.org> References: <201601052120.u05LKlQw074919@repo.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 2016-01-05 at 21:20 +0000, Warner Losh wrote: > Author: imp > Date: Tue Jan 5 21:20:47 2016 > New Revision: 293227 > URL: https://svnweb.freebsd.org/changeset/base/293227 > > Log: > Use the more proper -f. Leave /bin/rm in place since that's what > other rc scripts have, though it isn't strictly necessary. > > Modified: > head/etc/rc > > Modified: head/etc/rc > ===================================================================== > ========= > --- head/etc/rc Tue Jan 5 21:20:46 2016 (r293226) > +++ head/etc/rc Tue Jan 5 21:20:47 2016 (r293227) > @@ -132,9 +132,9 @@ done > # Remove the firstboot sentinel, and reboot if it was requested. > if [ -e ${firstboot_sentinel} ]; then > [ ${root_rw_mount} = "yes" ] || mount -uw / > - /bin/rm ${firstboot_sentinel} > + /bin/rm -f ${firstboot_sentinel} > if [ -e ${firstboot_sentinel}-reboot ]; then > - /bin/rm ${firstboot_sentinel}-reboot > + /bin/rm -f ${firstboot_sentinel}-reboot > [ ${root_rw_mount} = "yes" ] || mount -ur / > kill -INT 1 > fi > Using rm -f to suppress an error message seems like a bad idea here -- if the sentinel file can't be removed that implies it's going to do firstboot behavior every time it boots, and that's the sort of error that should be in-your-face. Especially on the reboot one because you're going to be stuck in a reboot loop with no error message. -- Ian
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1452038404.1320.46.camel>