Mon Jun 14 00:01:29 MDT 1999 / Russell Kroll <rkroll@exploits.org>

 - Applied patch from Peter Bieringer <pb@bieringer.de> 

   - upscommon/upscommon-addon: use syslog instead of printf when 
     installinfo/installinfodirect fails

Sun Jun 13 23:01:14 MDT 1999 / Russell Kroll <rkroll@exploits.org>

 - server/Makefile: clean target now removes statedebug

 - Makefile.in: "make" turned to "$(MAKE)", subdir compiles reworked

   I guess I've been spoiled by GNU utilities.  Now I understand why
   nobody uses the -C option in Makefiles even though it's so nifty.

   All subdirectories are now handled with the following form:

   cd dir; $(MAKE) target; cd ..

Sun Jun 13 22:08:34 MDT 1999 / Russell Kroll <rkroll@exploits.org>

 - upscommon: "Can't open" code redone somewhat to not trash errno with
   printf - remember the old "Not a typewriter" problems from yesteryear?

 - upscommon: writeinfo doesn't write anything in initial mode now.
   The idea is to perform a check of writing to the state file before the
   process enters the background and loses the controlling tty.

   This should fix the bug where programs could pick up a bogus status
   value for a few moments after the initial writeinfo happened but before
   the first "real" (non-initial) writeinfo was called.

 - upscommon: create_info added to make the info array either from shared
   memory OR in conventional memory which then gets written to disk

   So, shm support in the model support programs should be a matter of
   calling create_info instead of declaring one locally.

   Model programs should ask the user if they want to disable shm and 
   then set shmok accordingly.  1 = allow if available, 0 = never use.

 - smartups: shared memory support (via create_info)

 - upsd: staleness interval now 15 seconds

 - upsd: staleness checks changed to be more descriptive

 - upsd: updateups completely reworked to handle shared memory mode
   and switching between shm and state files on the fly

 - upsd: big changes to the ups tracking structures 

   The arrays (iptr/statefn and so on) are now gone and are replaced with
   a linked list that should allow any number of local UPSes without
   needless memory waste.  There are hooks for multiple UPS support, but it
   is not implemented yet in the program or the protocol.

   I expect it to work like this protocol-wise:

   REQ MODEL -> gives you the model info for the first/default UPS
                which should work fine for most single-UPS users

   REQ MODEL@second-ups -> gives you the model info for a UPS called
                           "second-ups", assuming it exists

   As for the user interface, "upsc second-ups@localhost" should work.

Fri Jun 11 23:06:46 MDT 1999 / Russell Kroll <rkroll@exploits.org>

 - smartups/upscommon: info array reworked for shm compatibility

   Other modules to follow...

0.40.1:

Fri Jun 11 13:38:40 MDT 1999 / Russell Kroll <rkroll@exploits.org>

 - Remaining Makefile targets added to new autoconf Makefile.in scheme

 - QUICKSTART file added for the impatient

Tue Jun  8 04:04:26 MDT 1999 / Russell Kroll <rkroll@exploits.org>  

 - README file rewritten to remove the "crystal ball problem" where
   new users had no idea what each program did.  Things should now be
   at least as descriptive as they were in 0.34.

 - multimon, upsstats: reworked to handle Celsius a little differently

   Thanks to autoconf, you can now do ./configure --enable-celsius ...

Tue Jun  8 02:58:26 MDT 1999 / Russell Kroll <rkroll@exploits.org>  

 - GNU configure now handles all details previously set by editing
   config.h

 - All: include config.h

 - clients: moved upsfetch from common, removed common

 - Hmm, COPYING wandered off.  It's back now.

Sun Jun  6 20:53:20 MDT 1999 / Russell Kroll <rkroll@exploits.org>  

 - Source cleanups: new subdirectories: models, clients, server, common

 - Makefiles redesigned to handle new layout

 - #includes rewritten for new directories

Sat Jun  5 22:06:59 MDT 1999 / Russell Kroll <rkroll@exploits.org>   

 - GNU autoconf support begins
 
 - Source tree reorg begins - lots of include files moved around 

0.40.0:

Sat Jun  5 01:22:00 MDT 1999 / Russell Kroll <rkroll@exploits.org>   

 - Version number change, doc tweaks for release version

0.40.0-pre6:

Mon May 31 12:11:45 MDT 1999 / Russell Kroll <rkroll@exploits.org>

 - upscommon: skip the writing phase when the data is stale

   It detects this by seeing if the last data read timed out.  upsd picks
   up on this after a minute by default, so everything down the line gets
   notified.  To test it, disconnect the serial cable from your UPS and
   watch what happens about a minute later.

0.40.0-pre5:

Sun May 30 18:42:41 MDT 1999 / Russell Kroll <rkroll@exploits.org>

 - multimon/upsstats: handle new "OFF" value

 - backupspro/smartups: internal status "00" now results in "OFF" value

 - docs/new-modules.txt revised to reflect new "OFF" value for status

Sun May 30 12:05:24 CEST 1999 / Peter Bieringer <pb@bieringer.de>

 - upscommon.h: new function nolongertimeout, which should be called after each
    successful read. Triggers the "Serial port" syslog messages.

0.40.0-pre4:

Sat May 29 19:01:24 MDT 1999

 - statedebug now compiles cleanly on BSD/OS without any funny resolv.h stuff

 - timeout() now uses sigaction to restore the SIGALRM to default
   since SA_ONESHOT does not work on BSD/OS, maybe others...

Sat May 29 18:21:51 MDT 1999

 - Note: INFOMAX was supposed to be the maximum count of how many info
   members a model support program could use total.  Since this number
   can vary wildly (backupspro uses 4, smartups uses at least 12), it
   was a way to save memory and do some bounds checking at the same time.

   To keep the confusion down, I've moved the #defines for INFOMAX around
   so that it's not forced to 16 in the upscommon module.  It should be
   defined in each model's source file if they compile with upscommon.

 - TODO: Move the growing assortment of model support programs to
   models/ to keep the source tree clean as suggested in Changes.trust

 - smartups/backupspro: Fixed help info for arguments (/dev/...)

 - merged in Trust UPS support from Peter Bieringer <pb@bieringer.de>
   See Changes.trust for more details

 - upsimage.cgi now uses -lgd rather than bluntly specifying the full 
   filename to the library - this will break compiles if your system
   doesn't find the lib and header files.

Sat May 22 16:22:29 MDT 1999

 - upscommon now uses sigaction() directly for timeout checking to get
   around a problem where read() would be restarted on some systems.

Fri May 21 17:27:54 MDT 1999

 - upslog now enters the background automatically.

 - upsmon still had the bogus openlog() facility.  Fixed.

 - Forgot to mention in the pre3 notes that a fix was added for hangs
   in the upsfetch module when the target host was down/unreachable...

0.40.0-pre3:

Tue May 18 17:56:06 MDT 1999

 - The example hosts.conf wandered off somewhere since 0.34.  It's back now.
   The install-cgi target also now copies it across just in case.

 - RECVTIMEOUT condition handling added to upsstrerror() - was causing
   some bogus 'unknown error' messages when it was a known condition...

 - upsfetch: error handling for DATA-STALE added

 - upsd: staleness check now performed on the state files.  After 60 seconds
   (default) of not changing, they will be declared stale and clients will get
   an error.  This is the first of many "no contact with UPS possible" 
   conditions that will be added.

   This is a pretty evil hack right now until a cleaner method is added.

 - I had openlog() using some bogus values for the second parameter.  The
   facility is now configurable in config.h - see #define LOG_FACILITY.

 - Computer room floods due to massive rainfall in Colorado.  Development 
   lags.  Ugh.

0.40.0-pre2:

Tue Apr 27 17:34:24 MDT 1999

 - Serial locking change - compiles on FreeBSD will now use uulock() instead
   of flock() without any change to config.h.  The eventual goal is to have
   autoconf take care of this without any future #define hacking.

   This means NO_SERIAL_FLOCK from pre2 is gone.

Mon Apr 26 17:10:44 MDT 1999

 - fix: upscommon: cfsetospeed() now has a matching cfsetispeed()
   Thanks for Alexander Nedotsukov for spotting this.

 - fix: upsmon now compiles on BSD/OS - needed to include errno.h

 - The default Makefile target no longer compiles the CGI programs.
   Do "make cgi" to build them.

 - New config.h #define possibility: NO_SERIAL_FLOCK - use this on
   FreeBSD 3.0 systems if you get an "not supported operation" error.
   Recommended by Alexander Nedotsukov.

 - backups: flock() test moved down a chunk in the serial open code.
