summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
Diffstat (limited to 'etc')
-rw-r--r--etc/mtree/BSD.tests.dist2
-rw-r--r--etc/rc10
2 files changed, 10 insertions, 2 deletions
diff --git a/etc/mtree/BSD.tests.dist b/etc/mtree/BSD.tests.dist
index ad76402..ff32324 100644
--- a/etc/mtree/BSD.tests.dist
+++ b/etc/mtree/BSD.tests.dist
@@ -622,6 +622,8 @@
..
pw
..
+ rpcbind
+ ..
sa
..
..
diff --git a/etc/rc b/etc/rc
index 2c90f38..576ddf9 100644
--- a/etc/rc
+++ b/etc/rc
@@ -130,11 +130,17 @@ for _rc_elem in ${files}; do
done
# Remove the firstboot sentinel, and reboot if it was requested.
+# Be a bit paranoid about removing it to handle the common failure
+# modes since the consequence of failure can be big.
+# Note: this assumes firstboot_sentinel is on / when we have
+# a read-only /, or that it is on media that's writable.
if [ -e ${firstboot_sentinel} ]; then
[ ${root_rw_mount} = "yes" ] || mount -uw /
- /bin/rm ${firstboot_sentinel}
+ chflags -R 0 ${firstboot_sentinel}
+ rm -rf ${firstboot_sentinel}
if [ -e ${firstboot_sentinel}-reboot ]; then
- /bin/rm ${firstboot_sentinel}-reboot
+ chflags -R 0 ${firstboot_sentinel}-reboot
+ rm -rf ${firstboot_sentinel}-reboot
[ ${root_rw_mount} = "yes" ] || mount -ur /
kill -INT 1
fi
OpenPOWER on IntegriCloud