tiger-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Tiger-devel] Merge update and problems with check_logfiles merge.


From: Ryan Bradetich
Subject: Re: [Tiger-devel] Merge update and problems with check_logfiles merge.
Date: 01 Jul 2003 08:03:48 -0600

> > I agree that the LOGINLOG does not appear to be present under Linux, 
> > but BTMP definately is.  By default the BTMP file is not present, but
> > if the file is created, bad login data will be stored in the file.
> 
> You are right. I will add it to the check.

Excellent!

> > The WTMP, LOGINLOG, UTMP, LASTLOG, and MESSAGES do not check to see if
> > the variables are defined to a file before throwing an error, claiming
> > the file does not exist.  Arguably the WTMP and UTMP will be present on
> > all systems, but according to the lastb man page WTMP is a local
> > configuration option as well.  HP-UX only has WTMP, UTMP, and BTMP
> > defined, and Tru64 only has WTMP and UTMP defined.  I think it is a good
> > idea to verify the log file is defined before throwing a message it does
> > not exist.
> 
> Ok. I will add some message in the else clause of the [ -n "LOGFILE" ]. 
> Maybe a configuration error.
> 
> > Thoughts/feedback?
> > 
> > 
> > I will be happy to generate a new patch against the CVS HEAD with this 
> > if everyone is agreeable, or I can make any changes once I understand
> > what is wrong with my logic :)
> 
> The only issue is that I don't want to do an
> +if [ -n "$UTMP" ] ; then
> (...)
> +fi
> 
> Without an else clause, some variables should be defined since they are 
> configured in the script:
> 
> WTMP=/var/log/wtmp
> BTMP=/var/log/btmp
> LASTLOG=/var/log/lastlog
> UTMP=/var/run/utmp
> LOGINLOG=/var/log/loginlog
> MESSAGES=/var/log/messages
> 
> And then modified per OS. It might make more sense to define this 
> variables in the config script of each OS with a failback here if not 
> defined or add them to the haveallvars check (after the 'haveallcmds'). 
> A proper flow could be:
> 
> 1.- each OS config script defines (and exports) proper 
> WTMP/BTMP/LASTLOG... variables
> 
> 2.- The script checks if a common set of variables are defined (WTMP, 
> UTMP and MESSAGES?), this is done by haveallvars. If they are not it 
> will abort.
> 
> 3.- Other variables (BTMP, LASTLOG, LOGINLOG, BTMP..) must be checked 
> before using them (with the [ -n "XXX" ] code) but no warning will be 
> given if they are not available.
> 
> This avoids adding the "$OS" clauses and puts that configuration into 
> where it should be (systems/$OS/config).
> 
> I will have to patch some more pieces than just this script for that to 
> work. Give me some time and I will implement it using some of the 
> information you provided in the patch and in your mail.


This all looks great to me!  I will pull down your patch when you commit
it and merge it back into my tree to verify all the checks I need
covered are covered.

Thanks much!

- Ryan

> Thanks!
> 
> Javi
-- 
Ryan Bradetich <address@hidden>





reply via email to

[Prev in Thread] Current Thread [Next in Thread]