From 1e40039260d1aed31095f1fd9e03edd7f0f9f13a Mon Sep 17 00:00:00 2001 From: Ed Schouten Date: Wed, 13 Jan 2010 19:07:48 +0000 Subject: [PATCH] Let rc and periodic infrastructure and newsyslog use the utmpx files. --- etc/newsyslog.conf | 2 +- etc/periodic/monthly/200.accounting | 2 +- etc/rc.d/cleanvar | 4 ++-- etc/rc.d/var | 14 +++++++------- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/etc/newsyslog.conf b/etc/newsyslog.conf index 354ed09fd099..79ad03739ccb 100644 --- a/etc/newsyslog.conf +++ b/etc/newsyslog.conf @@ -33,6 +33,6 @@ /var/log/ppp.log root:network 640 3 100 * JC /var/log/security 600 10 100 * JC /var/log/sendmail.st 640 10 * 168 B +/var/log/utx.log 644 3 * @01T05 B /var/log/weekly.log 640 5 1 $W6D0 JN -/var/log/wtmp 644 3 * @01T05 B /var/log/xferlog 600 7 100 * JC diff --git a/etc/periodic/monthly/200.accounting b/etc/periodic/monthly/200.accounting index 0be8c326abf5..46f153de535a 100755 --- a/etc/periodic/monthly/200.accounting +++ b/etc/periodic/monthly/200.accounting @@ -15,7 +15,7 @@ oldmask=$(umask) umask 066 case "$monthly_accounting_enable" in [Yy][Ee][Ss]) - W=/var/log/wtmp + W=/var/log/utx.log rc=0 remove=NO if [ ! -f $W.0 ] diff --git a/etc/rc.d/cleanvar b/etc/rc.d/cleanvar index 68e03bdc1119..d4b5b14f700f 100755 --- a/etc/rc.d/cleanvar +++ b/etc/rc.d/cleanvar @@ -58,8 +58,8 @@ cleanvar_start () { if [ -d /var/run -a ! -f /var/run/clean_var ]; then purgedir /var/run - # And an initial utmp file - (cd /var/run && cp /dev/null utmp && chmod 644 utmp) + # And an initial utmpx active session file + (cd /var/run && cp /dev/null utx.active && chmod 644 utx.active) >/var/run/clean_var fi if [ -d /var/spool/lock -a ! -f /var/spool/lock/clean_var ]; then diff --git a/etc/rc.d/var b/etc/rc.d/var index 4b57fb5026f2..8e5bddefb84e 100755 --- a/etc/rc.d/var +++ b/etc/rc.d/var @@ -98,12 +98,12 @@ case "${populate_var}" in ;; esac -# Make sure we have /var/log/lastlog and /var/log/wtmp files -if [ ! -f /var/log/lastlog ]; then - cp /dev/null /var/log/lastlog - chmod 644 /var/log/lastlog +# Make sure we have /var/log/utx.lastlogin and /var/log/utx.log files +if [ ! -f /var/log/utx.lastlogin ]; then + cp /dev/null /var/log/utx.lastlogin + chmod 644 /var/log/utx.lastlogin fi -if [ ! -f /var/log/wtmp ]; then - cp /dev/null /var/log/wtmp - chmod 644 /var/log/wtmp +if [ ! -f /var/log/utx.log ]; then + cp /dev/null /var/log/utx.log + chmod 644 /var/log/utx.log fi