summaryrefslogtreecommitdiff
path: root/etc
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2010-01-04 18:03:31 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2010-01-04 18:03:31 +0000
commit54af12c1a5459a4c743b43db8fecb69e70bf65f2 (patch)
treebcae888fbb99b8488411e91a38732e029104049b /etc
parent3657310ffde14b57c83bc9882dbf3df9ab64ad59 (diff)
If a /etc/rc.firsttime file exists, run it just once, mailing the output to
root. If anyone wants to use this in a siteXX.tgz file, please be sure to *concatenate* to the file -- not replace it -- since the installer is going to be using this file itself. discussed with todd and halex
Diffstat (limited to 'etc')
-rw-r--r--etc/rc9
1 files changed, 8 insertions, 1 deletions
diff --git a/etc/rc b/etc/rc
index 73e961bedcc..66735407831 100644
--- a/etc/rc
+++ b/etc/rc
@@ -1,4 +1,4 @@
-# $OpenBSD: rc,v 1.334 2009/12/04 21:58:41 deraadt Exp $
+# $OpenBSD: rc,v 1.335 2010/01/04 18:03:30 deraadt Exp $
# System startup script run by init on autoboot
# or after single-user.
@@ -779,6 +779,13 @@ if [ X"${krb5_slave_kdc}" = X"YES" ]; then
# Remember to enable hpropd in inetd.conf
fi
+# If rc.firstime exists, run it just once, and make sure it is deleted
+if [ -f /etc/rc.firsttime ]; then
+ mv /etc/rc.firsttime /etc/rc.firsttime.run
+ . /etc/rc.firsttime.run 2>&1 | mail -s 'rc.firsttime output' root
+fi
+rm -f /etc/rc.firsttime.run
+
[ -f /etc/rc.local ] && . /etc/rc.local
echo -n standard daemons: