Date: Sun, 3 Jan 2016 19:18:48 +0000 (UTC) From: Warner Losh <imp@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r293115 - head/etc Message-ID: <201601031918.u03JImBs012182@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: imp Date: Sun Jan 3 19:18:48 2016 New Revision: 293115 URL: https://svnweb.freebsd.org/changeset/base/293115 Log: Use /bin/rm to remove /firstboot*. Otherwise rm -i alias is picked up and can cause issues on boot with the prompts. Fix the read-only root case with horrible kludge of mounting rw removing the files, then mounting ro. But since that's no more horrible than the kludge of using marker files in /. With this change, NanoBSD configs can safely use /firstboot + growfs to produce minimal images that grow to the size of the card. Modified: head/etc/rc Modified: head/etc/rc ============================================================================== --- head/etc/rc Sun Jan 3 19:06:17 2016 (r293114) +++ head/etc/rc Sun Jan 3 19:18:48 2016 (r293115) @@ -131,11 +131,14 @@ done # Remove the firstboot sentinel, and reboot if it was requested. if [ -e ${firstboot_sentinel} ]; then - rm ${firstboot_sentinel} + [ ${root_rw_mount} = "yes" ] || mount -uw / + /bin/rm ${firstboot_sentinel} if [ -e ${firstboot_sentinel}-reboot ]; then - rm ${firstboot_sentinel}-reboot + /bin/rm ${firstboot_sentinel}-reboot + [ ${root_rw_mount} = "yes" ] || mount -ur / kill -INT 1 fi + [ ${root_rw_mount} = "yes" ] || mount -ur / fi echo ''
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201601031918.u03JImBs012182>