diff options
author | Roy Marples <roy@marples.name> | 2007-11-20 12:20:50 +0000 |
---|---|---|
committer | Roy Marples <roy@marples.name> | 2007-11-20 12:20:50 +0000 |
commit | a8fcb36d72da61ebc00fb61e720d2f66e0999556 (patch) | |
tree | 5cad804ca9d9ea233b5e466c0a05b0c83dd92b64 | |
parent | 91db53cef3536a45ab245d6f182fbd1c141583cf (diff) |
We don't use /var/lock anymore
-rwxr-xr-x | init.d/bootmisc | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/init.d/bootmisc b/init.d/bootmisc index f17e8536..251186f2 100755 --- a/init.d/bootmisc +++ b/init.d/bootmisc @@ -84,9 +84,9 @@ start() { rmdir /.test.$$ # Ensure that our basic dirs exist - for x in /var/lock /var/log /var/run /tmp; do + for x in /var/log /var/run /tmp; do if ! [ -d "${x}" ]; then - if ! mkdir "${x}"; then + if ! mkdir -p "${x}"; then eend 1 "failed to create needed directory ${x}" return 1 fi @@ -99,14 +99,7 @@ start() { chgrp utmp /var/run/utmp /var/log/wtmp chmod 0664 /var/run/utmp /var/log/wtmp - # Take care of random stuff [ /var/lock | /var/run | pam ] - ebegin "Cleaning /var/lock, /var/run" - rm -rf /var/run/console.lock /var/run/console/* - - # Clean up any stale locks. - find /var/lock -type f -print0 | xargs -0 rm -f -- - - # Clean up /var/run and create /var/run/utmp so we can login. + ebegin "Cleaning /var/run" for x in $(find /var/run ! -type d ! -name utmp ! -name innd.pid \ ! -name random-seed ! -name ld-elf.so.hints ! -name ld.so.hints); do [ ! -f "${x}" ] && continue @@ -126,13 +119,10 @@ start() { pam_console_apply -r fi fi - - # Create the .keep to stop portage from removing /var/lock - printf "" >/var/lock/.keep eend 0 # Clean up /tmp directories - local tmp + local tmp= for tmp in ${WIPE_TMP_DIRS-/tmp}; do cleanup_tmp_dir "${tmp}" done |