Merge some of reb's OpenBSD fixes in

This commit is contained in:
Roy Marples
2007-07-25 20:58:23 +00:00
parent af2d9995d7
commit 075e80b358
7 changed files with 72 additions and 28 deletions

View File

@@ -53,7 +53,8 @@ start() {
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 ! -name random-seed ! -name ld-elf.so.hints); do
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
# Do not remove pidfiles of already running daemons
case "${x}" in
@@ -66,9 +67,9 @@ start() {
done
# Reset pam_console permissions if we are actually using it
if [ -x /sbin/pam_console_apply -a ! -c /dev/.devfsd ] ; then
if [ -n $(grep -v -e '^[[:space:]]*#' /etc/pam.d/* | grep 'pam_console') ] ; then
/sbin/pam_console_apply -r
if [ -x /sbin/pam_console_apply ] && ! [ -c /dev/.devfsd ] ; then
if grep -v -e '^[[:space:]]*#' /etc/pam.d/* | grep -q 'pam_console.so' ; then
pam_console_apply -r
fi
fi