diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 1997-09-26 18:43:46 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 1997-09-26 18:43:46 +0000 |
commit | d6427d0dca1d981238ad99ef8a388b633f6c155f (patch) | |
tree | a57b2ad3bd617db30ab83eb636d43c332865791b /etc | |
parent | f219c0ac18ed0b4ab9d257679afd03a1a8e68af0 (diff) |
Clear /tmp before running /etc/rc.securelevel. Brian Candler <btc@demon.net>
Diffstat (limited to 'etc')
-rw-r--r-- | etc/rc | 18 |
1 files changed, 9 insertions, 9 deletions
@@ -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 |