Bugs item #595457, was opened at 2002-08-15 02:46
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=113751&aid=595457&group_id=13751

Category: Release/Branch: Bering
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Dan Harkless (dan_harkless)
Assigned to: Jacques Nilo (jnilo)
Summary: No /var/log/wtmp causes weird last error

Initial Comment:
If you type 'last' on Bering 1.0-rc3, you get:

    USER     TTY     PID     TIMEON  FROM
    dutmp: /var/log/wtmp: input/output error -- «^þ¿±^þ¿: 
No such file or directory

There are actually two problems here.  One is the 
garbage string that appears between "-- " and ":" in the 
dutmp error message.  This would seem to be a format 
string bug in BusyBox.  Hopefully you can pass this part 
of the bug report on to the BusyBox author(s).

The other problem, of course, is that we shouldn't be 
getting this error in the first place.  The problem is that 
unlike the files in /var/log that are written to by the 
syslogd, wtmp will not be written to unless it exists in 
the first place.  One can easily remedy this during a 
particular LEAF uptime period by 
typing "touch /var/log/wtmp", but the problem is how to 
get wtmp to be there every time you boot.

Because root.exclude.list includes "var/log", root can't 
include a zero-length /var/log/wtmp unless you do a 
backup "Everything INCLUDING log", which is overkill, 
and may cause /var/log/wtmp to disappear next time 
you do a normal backup of root.lrp (not sure about this 
part).

What I did instead was to modify /etc/init.d/sysklogd to 
touch /var/log/wtmp when it starts, since this is also the 
point when other files in /var/log get created:

      start)
        echo -n "Starting system log daemon: syslogd"
        start-stop-daemon --start --quiet --
exec /sbin/syslogd -- $SYSLOGD
        echo -n " klogd"
        start-stop-daemon --start --quiet --exec /sbin/klogd -
- $KLOGD
        echo "."
        touch /var/log/wtmp
        ;;

The second-to-last line is the new one.

Note that /etc/lrp.conf already includes 
lrp_LOGS_MONTHLY="wtmp", probably inherited from 
Bering ancestors that _did_ have a /var/log/wtmp by 
default, so log cycling is all taken care of and the above 
touch command should be a sufficient fix for this 
problem.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=113751&aid=595457&group_id=13751


-------------------------------------------------------
This sf.net email is sponsored by: OSDN - Tired of that same old
cell phone?  Get a new here for FREE!
https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390

_______________________________________________
Leaf-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/leaf-devel

Reply via email to