Let rc and periodic infrastructure and newsyslog use the utmpx files.
This commit is contained in:
parent
5046a4d149
commit
1e40039260
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=202218
@ -33,6 +33,6 @@
|
|||||||
/var/log/ppp.log root:network 640 3 100 * JC
|
/var/log/ppp.log root:network 640 3 100 * JC
|
||||||
/var/log/security 600 10 100 * JC
|
/var/log/security 600 10 100 * JC
|
||||||
/var/log/sendmail.st 640 10 * 168 B
|
/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/weekly.log 640 5 1 $W6D0 JN
|
||||||
/var/log/wtmp 644 3 * @01T05 B
|
|
||||||
/var/log/xferlog 600 7 100 * JC
|
/var/log/xferlog 600 7 100 * JC
|
||||||
|
@ -15,7 +15,7 @@ oldmask=$(umask)
|
|||||||
umask 066
|
umask 066
|
||||||
case "$monthly_accounting_enable" in
|
case "$monthly_accounting_enable" in
|
||||||
[Yy][Ee][Ss])
|
[Yy][Ee][Ss])
|
||||||
W=/var/log/wtmp
|
W=/var/log/utx.log
|
||||||
rc=0
|
rc=0
|
||||||
remove=NO
|
remove=NO
|
||||||
if [ ! -f $W.0 ]
|
if [ ! -f $W.0 ]
|
||||||
|
@ -58,8 +58,8 @@ cleanvar_start ()
|
|||||||
{
|
{
|
||||||
if [ -d /var/run -a ! -f /var/run/clean_var ]; then
|
if [ -d /var/run -a ! -f /var/run/clean_var ]; then
|
||||||
purgedir /var/run
|
purgedir /var/run
|
||||||
# And an initial utmp file
|
# And an initial utmpx active session file
|
||||||
(cd /var/run && cp /dev/null utmp && chmod 644 utmp)
|
(cd /var/run && cp /dev/null utx.active && chmod 644 utx.active)
|
||||||
>/var/run/clean_var
|
>/var/run/clean_var
|
||||||
fi
|
fi
|
||||||
if [ -d /var/spool/lock -a ! -f /var/spool/lock/clean_var ]; then
|
if [ -d /var/spool/lock -a ! -f /var/spool/lock/clean_var ]; then
|
||||||
|
14
etc/rc.d/var
14
etc/rc.d/var
@ -98,12 +98,12 @@ case "${populate_var}" in
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
# Make sure we have /var/log/lastlog and /var/log/wtmp files
|
# Make sure we have /var/log/utx.lastlogin and /var/log/utx.log files
|
||||||
if [ ! -f /var/log/lastlog ]; then
|
if [ ! -f /var/log/utx.lastlogin ]; then
|
||||||
cp /dev/null /var/log/lastlog
|
cp /dev/null /var/log/utx.lastlogin
|
||||||
chmod 644 /var/log/lastlog
|
chmod 644 /var/log/utx.lastlogin
|
||||||
fi
|
fi
|
||||||
if [ ! -f /var/log/wtmp ]; then
|
if [ ! -f /var/log/utx.log ]; then
|
||||||
cp /dev/null /var/log/wtmp
|
cp /dev/null /var/log/utx.log
|
||||||
chmod 644 /var/log/wtmp
|
chmod 644 /var/log/utx.log
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user