summaryrefslogtreecommitdiff
path: root/etc
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>1997-09-26 18:43:46 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>1997-09-26 18:43:46 +0000
commitd6427d0dca1d981238ad99ef8a388b633f6c155f (patch)
treea57b2ad3bd617db30ab83eb636d43c332865791b /etc
parentf219c0ac18ed0b4ab9d257679afd03a1a8e68af0 (diff)
Clear /tmp before running /etc/rc.securelevel. Brian Candler <btc@demon.net>
Diffstat (limited to 'etc')
-rw-r--r--etc/rc18
1 files changed, 9 insertions, 9 deletions
diff --git a/etc/rc b/etc/rc
index e40713ee50b..a2dd08258b3 100644
--- a/etc/rc
+++ b/etc/rc
@@ -1,4 +1,4 @@
-# $OpenBSD: rc,v 1.48 1997/09/20 07:40:40 deraadt Exp $
+# $OpenBSD: rc,v 1.49 1997/09/26 18:43:45 millert Exp $
# System startup script run by init on autoboot
# or after single-user.
@@ -216,6 +216,14 @@ if [ -f /etc/ptmp ]; then
'password file may be incorrect -- /etc/ptmp exists'
fi
+echo clearing /tmp
+
+# prune quickly with one rm, then use find to clean up /tmp/[lq]*
+# (not needed with mfs /tmp, but doesn't hurt there...)
+(cd /tmp && rm -rf [a-km-pr-zA-Z]* &&
+ find . ! -name . ! -name lost+found ! -name quota.user \
+ ! -name quota.group -exec rm -rf -- {} \; -type d -prune)
+
test -f /etc/rc.securelevel && . /etc/rc.securelevel
if [ X${securelevel} != X"" ]; then
echo -n 'setting kernel security level: '
@@ -242,14 +250,6 @@ if [ "$virecovery" != "/var/tmp/vi.recover/recover.*" ]; then
done
fi
-echo clearing /tmp
-
-# prune quickly with one rm, then use find to clean up /tmp/[lq]*
-# (not needed with mfs /tmp, but doesn't hurt there...)
-(cd /tmp && rm -rf [a-km-pr-zA-Z]* &&
- find . ! -name . ! -name lost+found ! -name quota.user \
- ! -name quota.group -exec rm -rf -- {} \; -type d -prune)
-
if [ -f /var/account/acct ]; then
echo 'turning on accounting'; accton /var/account/acct
fi