We don't use /var/lock anymore
This commit is contained in:
parent
91db53cef3
commit
a8fcb36d72
@ -84,9 +84,9 @@ start() {
|
|||||||
rmdir /.test.$$
|
rmdir /.test.$$
|
||||||
|
|
||||||
# Ensure that our basic dirs exist
|
# 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 ! [ -d "${x}" ]; then
|
||||||
if ! mkdir "${x}"; then
|
if ! mkdir -p "${x}"; then
|
||||||
eend 1 "failed to create needed directory ${x}"
|
eend 1 "failed to create needed directory ${x}"
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
@ -99,14 +99,7 @@ start() {
|
|||||||
chgrp utmp /var/run/utmp /var/log/wtmp
|
chgrp utmp /var/run/utmp /var/log/wtmp
|
||||||
chmod 0664 /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/run"
|
||||||
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.
|
|
||||||
for x in $(find /var/run ! -type d ! -name utmp ! -name innd.pid \
|
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
|
! -name random-seed ! -name ld-elf.so.hints ! -name ld.so.hints); do
|
||||||
[ ! -f "${x}" ] && continue
|
[ ! -f "${x}" ] && continue
|
||||||
@ -126,13 +119,10 @@ start() {
|
|||||||
pam_console_apply -r
|
pam_console_apply -r
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Create the .keep to stop portage from removing /var/lock
|
|
||||||
printf "" >/var/lock/.keep
|
|
||||||
eend 0
|
eend 0
|
||||||
|
|
||||||
# Clean up /tmp directories
|
# Clean up /tmp directories
|
||||||
local tmp
|
local tmp=
|
||||||
for tmp in ${WIPE_TMP_DIRS-/tmp}; do
|
for tmp in ${WIPE_TMP_DIRS-/tmp}; do
|
||||||
cleanup_tmp_dir "${tmp}"
|
cleanup_tmp_dir "${tmp}"
|
||||||
done
|
done
|
||||||
|
Loading…
Reference in New Issue
Block a user