0.44.2:

Wed Dec 27 19:28:12 CST 2000 / Russell Kroll <rkroll@exploits.org>

 *** Binary change notice ***

 * This is mentioned further down the file, but is repeated here for the
   benefit of people who only read the first page of such things.

   Certain things like upsmon and upsd may install into a 'sbin' directory
   on your system with this release.  If you use the stock paths, that
   means /usr/local/ups/sbin is the new home of those programs.  Be sure
   to update your startup scripts or you may run the old versions!

 * various: documentation updates and final housekeeping for release

0.44.2-pre4:

Fri Dec 22 13:01:58 CST 2000 / Russell Kroll <rkroll@exploits.org>

 - Applied patch from Nigel Metheringham (nut-0.44.2-pre3-itomod21.patch):

   - upsct2: new features:

     - -s can now take input in the form of <var>=<value> to allow
       non-interactive variable changing

     - -p <password> added, mostly for noninteractive mode

   - shared-tables.h: many more variables

   - shared.h: corresponding #defines for new variables

   - newapc: driver updates

   - nut.spec: new version

Fri Dec 22 12:40:59 CST 2000 / Russell Kroll <rkroll@exploits.org>

 - Applied patch from Mark Powell (nut-0.44.2-medp.patch):

Thu Dec 14 11:49:37 GMT 2000 / Mark Powell <medp@primagraphics.co.uk>

 - Changes to build on SunOS4
   - SunOS4 needs sys/ipc.h before sys/shm.h
   - models: SunOS4 doesn't have getopt decls in any header file, so added
     explicit declarations in common.h.
   - inet_aton.c: Added stddef for NULL and sys/types.h for inet types.
     Added a define for INADDR_NONE.
   - Added an atexit that calls on_exit.
   - Added a simple strerror derived from libiberty.
   - The CGI stuff probably won't build, I didn't try.
   - See README.sunos for an install procedure that works.
   - Fix install dir in man.

Sat Dec  9 21:57:46 CST 2000 / Russell Kroll <rkroll@exploits.org>

 - {clients|models}/Makefile.in, inet_aton.c: applied patch from 
   Ben Collver for compatibility with Solaris 5.x.  
   (nut-0.44.2-pre3-bens3.diff)

0.44.2-pre3:

Sat Dec  2 19:45:23 CST 2000 / Russell Kroll <rkroll@exploits.org>

 *** upsd and upsmon have moved! ***

 If you're used to finding them in /usr/local/ups/bin or similar,
 you will now have to start them from /usr/local/ups/sbin.

Sat Dec  2 19:33:11 CST 2000 / Russell Kroll <rkroll@exploits.org>

 - Applied patch from Nick Hibma:

   - upsmon: "Unable to login" now logged as ERR severity
   - upsd: "NULL password" warning now gets syslogged

Sat Dec  2 19:20:01 CST 2000 / Russell Kroll <rkroll@exploits.org>

 - nut.spec: new version from Nigel Metheringham

 - Applied patch from Nigel Metheringham (nut-stringlengths.patch)
   Patch notes:

   Basically I hit a problem where passing all the variables that
   the new APC driver knows about overran a pile of buffers.
   This replaces all the char x[256] with char x[SMALLBUF]
   and similarly for 512->LARGEBUF.  I have then defined these
   in common.h as 512 & 1024 respectively which gets me out of that
   hole, but we need to look at the string handling more generally

Sat Dec  2 19:18:08 CST 2000 / Russell Kroll <rkroll@exploits.org>

 - Applied patch from Nigel Metheringham (nut-script-changes.patch)
   Patch notes:

   There are now 3 RH scripts:-
        upsd - starts/stops the model driver and upsd
                also if called as "upsd powerdown" sends the
                power off signal to all attached UPSes
        upsmon - starts/stops upsmon
        upspowerdown - replicates all the functionality
                of /etc/rc.d/init.d/halt plus a callout to
                upsd powerdown at the appropriate point.
                This is *so* *ugly* but at least does the
                right thing

   Also moves upsd & upsmon to /usr/sbin where FHS says they
   should be.  upsd & upsmon start scripts are marco-ised and
   built by ./configure with right paths for things

Sat Dec  2 19:10:49 CST 2000 / Russell Kroll <rkroll@exploits.org>

 - Applied patch from Nigel Metheringham (nut-newapc.patch)

   - newapc: new table-driven driver for APC smart protocol units
   - variable information from upsd.h split into include/shared-tables.h
   - many more variables defined (shared.h, new-modules.txt)

   Patch notes:

   Adds a pile of new NUT variables for other things that the new
   APCs know about
   Splits some data from upsd.h into shared-tables.h so that other
   progs can use this data (I use it for error messages).
   Makes apcsmart handle large sets of variables
   Adds some minor debug bug fixes into upscommon
   Adds a new "newapc" driver which is a table driven UPS driver
   which attempts to determine the UPS capabilities and then
   report on those features.
   Having just looked at the patch I seem to have some superfluous
   crud in newapc.c (initial defines - but that can be cleaned up 
   later).
   I have been using this driver for around 6 months - it works
   *really* well.

Sat Dec  2 19:02:03 CST 2000 / Russell Kroll <rkroll@exploits.org>

 - apcsmart: applied patch from Patrik Rak:

   - the values for -s are now explained in the -h text
   - fixes a bug in shutdown type 1 (4 characters sent instead of 5)
   - there is now a type 3: force a power off with the grace period

Sat Dec  2 18:51:21 CST 2000 / Russell Kroll <rkroll@exploits.org>

 - apcsmart: applied patch from Patrik Rak that changes the behavior of
   -k slightly - it no longer requires an argument and can be placed
   anywhere on the command line.

Tue Nov 28 15:52:16 CST 2000 / Russell Kroll <rkroll@exploits.org>

 - upssched: PIPEFN in the config file will now set the filename used
   for the FIFO that provides the interprocess communication.

Tue Nov 28 15:03:42 CST 2000 / Russell Kroll <rkroll@exploits.org>

 - upsmon: debug mode now available with -d at runtime.  There is no 
   longer any need to play with #defines to enable and disable it.
   Suggested by Oliver Jones.

Tue Nov 28 14:23:43 CST 2000 / Russell Kroll <rkroll@exploits.org>

 - upsmon: new configuration directive to control NOTIFY_REPLBATT timing.
   If your UPS starts flying the RB flag, upsmon will only invoke that
   notifier every RBWARNTIME seconds.  By default this is set to 12 
   hours worth of seconds.

Tue Nov 28 14:19:49 CST 2000 / Russell Kroll <rkroll@exploits.org>

 - upsmon: MONITOR lines with missing arguments will now be discarded
   and a warning will be printed.  Previously it would segfault when
   trying to massage a NULL pointer.

Tue Nov 28 14:14:42 CST 2000 / Russell Kroll <rkroll@exploits.org>

 - apcsmart: BATTDATE: new read/write variable.  Use it to store the 
   date your battery was last changed for tracking purposes.  Guess who's
   battery turned 4 years old last month...

 - upsd: BATTDATE support

Tue Nov 28 14:00:55 CST 2000 / Russell Kroll <rkroll@exploits.org>

 - upssched: the temporary pipe is now unlinked when the server process
   ends to keep things relatively clean.  You can also use it to detect
   when a server process is running from a shell script or similar.

 - upssched: dumped the ntable[] from the header file so it is not
   restricted to a specific set of notify types.  Now, any valid notify
   type from upsmon can be checked in upssched.

Tue Nov 28 02:05:38 CST 2000 / Russell Kroll <rkroll@exploits.org>

 - docs: model-arguments.txt added to try to keep all these things together

Mon Nov  6 00:55:51 CST 2000 / Russell Kroll <rkroll@exploits.org>

 - fentonups: squashed a bug that reported the output voltage as the utility
   and vice-versa.  Reported by Damion de Soto.

Fri Nov  3 06:16:25 CST 2000 / Russell Kroll <rkroll@exploits.org>

 - docs/upssched.txt: documentation for the new program.

Tue Oct 31 16:50:15 CST 2000 / Russell Kroll <rkroll@exploits.org>

 - upsmon: if the final system() call to the shutdown command fails,
   we log something about it.  Suggested by Bill Richter.

Tue Oct 31 16:25:29 CST 2000 / Russell Kroll <rkroll@exploits.org>

 - genericups: the model and manufacturer strings can now be overriden with
   -m and -M, respectively.  Use this when you have a UPS that matches a 
   given type but has a different identification.

   The most common use will probably be with type 4 (RUPS cable), since
   many models use this cable but all of them aren't really by Centralion.

Fri Oct 27 15:01:09 CDT 2000 / Russell Kroll <rkroll@exploits.org>

 - upsmon: NOTIFY_REPLBATT added.  This event is used when a UPS reports
   a bad battery that needs to be replaced.  Necessity is the mother of
   invention - my 4 year old SU700 started flying the RB flag today.

0.44.2-pre2:

Mon Oct 23 23:27:00 CDT 2000 / Russell Kroll <rkroll@exploits.org>

 - genericups: reversed the sense of the ioctl return code checking.
   Previously it assumed every call was wrong.  Spotted by Eric Lawson.

Mon Oct 23 23:19:28 CDT 2000 / Russell Kroll <rkroll@exploits.org>

 - configure.in: added test for sys/shm.h to get upscommon compiling on
   normal systems

Mon Oct 23 23:10:23 CDT 2000 / Russell Kroll <rkroll@exploits.org>

 - Applied another compatibility patch from Ben Collver:

   - inet_aton compatibility function in common

   - scripts/Windows: halt utility so you can bring down Win32 systems (!)
     via upsmon.

Mon Oct 23 22:50:33 CDT 2000 / Russell Kroll <rkroll@exploits.org>

 - upsd: staleness warnings in the syslog now include some information
   as to why it happened.  Patch from Kenneth Porter.

Mon Oct 23 22:33:05 CDT 2000 / Russell Kroll <rkroll@exploits.org>

 - upssched: new 'client' program - actually a helper for upsmon.
   This program is responsible for handling things that happen at some
   point in the future relative to an event.  If you want to send a 
   message only after the UPS has been on battery for 30 seconds, this
   is what you want.

   Similarly, if you want to shut down the system after it's been
   on battery for awhile (before the auto low battery shutdown), this
   will also be how it happens.  The functionality in upsmon for the
   forced shutdown callback does not exist yet, though.

   Note that this is still in development and uses a hardcoded named
   pipe in /tmp right now.  You have been warned.

Mon Oct 23 22:06:58 CDT 2000 / Russell Kroll <rkroll@exploits.org>

 - upsd: added a workaround for ACLs using the /32 CIDR notation.  It
   turns out that the ((1 << 32) - 1) gets mangled nicely due to the
   limitation of the int and winds up as a 0.  Now it detects a /32 and
   just sets all the mask bits to 1, which is what we really want anyway.

Mon Oct 23 21:15:15 CDT 2000 / Russell Kroll <rkroll@exploits.org>

 - clients/Makefile: upsfetch.o doesn't need $(LIBOBJ) since it's 
   merely compiling a .c to a .o and isn't linking anything yet

 - Applied a jumbo patch from Ben Collver for HPUX support:

   - Lots more function checks in the configure phase

   - common.o is now expressed with LIBOBJ so we can add other support
     libraries to it

   - snprintf from the Samba project is now added (via LIBOBJ) when needed

   - proto.h is used throughout for common compatibility prototypes
     (snprintf again)

   - common: setenv now available for systems that don't already have it

 * Back to development.  I'm in Texas now (hence the 'CDT') for those 
   of you keeping track.

0.44.2-pre1:

Sun Sep 10 12:30:28 MDT 2000 / Russell Kroll <rkroll@exploits.org>

 - man/Makefile.in: cleaned up to use @mandir@ and copy apcsmart.8 over
   Use configure --mandir=<path> to put the man pages where you like them.
   Otherwise, they'll be in man/man8 under the base install path.

Sun Sep 10 11:55:59 MDT 2000 / Russell Kroll <rkroll@exploits.org>

 - bestuferrups: CTRL('q') -> 17, for portability (see below)

Sun Sep 10 11:42:36 MDT 2000 / Russell Kroll <rkroll@exploits.org>

 - man: updated powercom.8 and new apcsmart.8 man pages from Bill Richter.

Sun Sep 10 11:36:45 MDT 2000 / Russell Kroll <rkroll@exploits.org>

 - upsmon: NOTIFY_COMMBAD now exists.  Previously it was impossible to find
   out when the UPS had disappeared since no notify event was being
   triggered.  Found by Shaul Karl.

 - genericups: all calls to ioctl now check the return value and complain
   if anything seems amiss.  Suggested by Allen Mcintosh.

Sun Sep 10 11:33:13 MDT 2000 / Russell Kroll <rkroll@exploits.org>

 - genericups: tcsendbreak now uses 4901 as the interval, since the
   previous value of 50 was much too short.  Tested by Peter Astrand.

 - bestups: PR2 is now recognized as the Patriot Pro II.  Patch from
   "Mark".

Sun Sep 10 11:28:46 MDT 2000 / Russell Kroll <rkroll@exploits.org>

 - upsmon.conf: example SHUTDOWNCMD now has "" around it, since the new
   style parser splits lines by spaces unless the words are inside the
   quotes.  This caused the example command to lack arguments.  Spotted by
   Bill Richter.

 - apcsmart: the "BC" status following a front panel test on older
   Smart-UPS units (BC == all the LEDs are still on) is now ignored.
   Testing and other help from Bill Richter.

Sun Sep 10 11:13:50 MDT 2000 / Russell Kroll <rkroll@exploits.org>

 - upscommon: upsrecv will now dump the received buffer when upsc_debug
   is set, so you can see what's coming in.  Patch from Kenneth Porter.

 - toshiba1500: new model driver for Toshiba 1500 units from Kenneth Porter.

 - bestuferrups: new model driver for Best Power Micro-Ferrups from
   John Stone.

Sun Sep  3 19:22:06 MDT 2000 / Russell Kroll <rkroll@exploits.org>

 - upscommon: #error added for fringe conditions where HAVE_CFSETISPEED
   isn't defined.  Suggested by Kenneth Porter.

 - man/Makefile.in: new file with install targets for the man pages from
   Shaul Karl.

Sun Sep  3 19:10:17 MDT 2000 / Russell Kroll <rkroll@exploits.org>

 - models/Makefile.in: *.c added as a dependency for the $(PROGS).  This
   forces a recompile of all models when any of them change, but it beats
   the previous situation where *none* of them got rebuilt.

   Incidentally, things like this...

   $(PROGS): %: upscommon.o ../include/shared.h ../common/common.o %.c

   ... fix the problem perfectly on GNU make and fail miserably on BSD.
   Anyone have a portable solution?

Sun Sep  3 17:21:39 MDT 2000 / Russell Kroll <rkroll@exploits.org>

 - apcsmart: new shutdown command 2 will turn the UPS off completely.
   Use -k -s 2 to trigger. (Igor Khristophorov)

 - nut.spec: new version from Nigel Metheringham

Sun Sep  3 17:01:43 MDT 2000 / Russell Kroll <rkroll@exploits.org>

 - upscommon: the return value from shmget() is now checked rather than
   blindly handing it to shmat().  This should fix some SIGSYS errors on
   systems that lack SysV shared memory support.

 - upsd: switched the pow(2,x) to 1<<x and dumped math.h/-lm

Sun Sep  3 16:53:31 MDT 2000 / Russell Kroll <rkroll@exploits.org>

 - upsmon: pulled out the dupfds() now that background() does it for us

 - upscommon: background() now points fds 0-2 at /dev/null to keep them
   from being gobbled up by other accesses in the child process

Sun Sep  3 16:47:35 MDT 2000 / Russell Kroll <rkroll@exploits.org>

 - upscommon: background() now calls setsid() to establish a new session
   which should dodge signals that bring the programs down on some systems
   at startup.  Tested by Bob Pekarske.

 - packaging/RedHat/awkhaltprog: new helper script from Jon Nelson

 * various: changes to remove warnings and other problems when compiling
   with -Wstrict-prototypes -pedantic-errors

Tue Aug 22 19:26:14 MDT 2000 / Russell Kroll <rkroll@exploits.org>

 * Notes on the security stuff: you can now run the models as one user
   and upsd as another, just as long as they both belong to the same group.
   This way, compromising upsd will not allow an intruder to access your
   serial ports directly.

   The easiest way to use this is to invoke the programs with su.

   models: su <user #1> -c <model and args>
   server: su <user #2> -c <upsd and any args>

   Make the serial port(s) owned by user #1, mode 0600.  Then make sure
   any old state files are cleaned out so they can be created with the
   proper permissions when the new versions start.

   You don't have to do this.  It's just a good idea.   

   Inspired by a post to the list by Daniel Roesen.

 - upscommon: various changes to support a better security model:

   - The state file is created with group read permissions

   - The SHM struct now has group read+write permissions

   - The SysV message queue now has group read+write permissions

0.44.1:

Tue Aug 22 18:23:37 MDT 2000 / Russell Kroll <rkroll@exploits.org>

 * various: Documentation updates for release.

 - nut.spec: update from Nigel Metheringham

0.44.1-pre4:

Sat Aug 19 16:41:54 MDT 2000 / Russell Kroll <rkroll@exploits.org>

 - bestups: patch from Nick Allan to add SOLA 520 recognition.

Sat Aug 19 16:39:06 MDT 2000 / Russell Kroll <rkroll@exploits.org>

 - models/Makefile.in: applied patch from Bill Carlson to make this
   build without hand-hacking the Makefile.

 - dummyups.txt: documentation from Bill Carlson for this testing driver.

Sat Aug 19 16:34:45 MDT 2000 / Russell Kroll <rkroll@exploits.org>

 - powercom: applied patch from Shaul Karl with more options and features.

Sat Aug 19 16:27:01 MDT 2000 / Russell Kroll <rkroll@exploits.org>

 - nut.spec: applied patch from Bill Carlson to switch to --with-user and
   --with-group instead of the old uid/gid mode

 - configure.in: the default user when uu_lock is found is now uucp, 
   which makes more sense on FreeBSD systems.   

 - bestups: tcgetattr() now called to prep the struct which fixes a
   bug where it would fail to start on FreeBSD. 

 - bestups: also added tcset(i,o)speed calls to set the speed properly, 
   which is needed to make it run on FreeBSD

 - upscommon: changed to only call uu_lock once on FreeBSD systems

 - genericups: uses tcsendbreak() for portability when TIOCM_ST is the flag.

0.44.1-pre3:

Sun Aug 13 19:39:44 MDT 2000 / Russell Kroll <rkroll@exploits.org>

 - upsmon: worked around a problem where the syslog fd would get nuked
   by the dupfds() function so no logging worked after that point

 - docs/access.txt: changed the "which one comes first" section
   to match the update to upsd

 - upsd: reworked the access checking since it wasn't behaving properly.
   Now it checks for bitwise matches rather than just "is greater than"...

Sun Aug 13 17:32:09 MDT 2000 / Russell Kroll <rkroll@exploits.org>

 - upscommon: squashed a warning from a function that isn't used when
   shared memory is disabled.

 - configure.in: fixed a bug that crept in with the shared memory disable
   argument that forced the default mode (no arg) to also turn it off.

Sun Aug 13 17:08:52 MDT 2000 / Russell Kroll <rkroll@exploits.org>

 - nut.spec: restored after realizing that one of my 'make setver' 
   calls had blown it away previously...

Sun Aug 13 16:55:39 MDT 2000 / Russell Kroll <rkroll@exploits.org>

 - man/powercom: new directory with a man page for the powercom driver
   from Shaul Karl.

 - genericups: applied patch from Peter strand that makes TIOCM_ST work.

 - upsstats: "UPS Input" should no longer have that off by one error

Mon Jul 31 08:38:57 MDT 2000 / Russell Kroll <rkroll@exploits.org>

 - models/Makefile.in: put @SERLIBS@ back to fix compiles on FreeBSD.
   This fell out when the file was changed to use a combined rule
   for builds.

Mon Jul 31 08:12:06 MDT 2000 / Russell Kroll <rkroll@exploits.org>

 - models/Makefile.in: reworked to build with BSD make again

Sun Jul 30 13:06:09 MDT 2000 / Russell Kroll <rkroll@exploits.org>

 - fentonups: BATTVOLT and OUTVOLT are now supported

 - configure: ran autoreconf so --without-shared-memory actually shows up

Sun Jul 30 12:58:18 MDT 2000 / Russell Kroll <rkroll@exploits.org>

 * Note to those using upsreadraw() from upscommon - the newline is no
   longer included in the buffer, so the "buf[strlen(buf)-1] = '\0'"
   junk can now be discarded.

 - upscmd, upsct2, upsmon: newline fixes

 - upsset: Fixed bugs that cropped up when the newline handling in
   upsreadraw() was changed.  Also fixed some bugs where a file handle
   was getting closed twice for some reason.

Sun Jul 30 12:30:10 MDT 2000 / Russell Kroll <rkroll@exploits.org>

 - apcsmart: BATTVOLT and OUTVOLT are now supported

Sun Jul 30 12:16:52 MDT 2000 / Russell Kroll <rkroll@exploits.org>

 - upscommon: reworked the serial locking code so it should be functional
   again.  The ports are also now opened with O_EXCL to keep other 
   processes from grabbing them.

Sun Jul 30 11:57:58 MDT 2000 / Russell Kroll <rkroll@exploits.org>

 - upsmon: the notifycmd script now gets UPSNAME in the environment too.

0.44.1-pre2:

Sat Jul 29 20:49:07 MDT 2000 / Russell Kroll <rkroll@exploits.org>

 - powercom: new model from Shaul Karl for PowerCom models.  Essentially
   this is the ups-trust425+625, only improved and with -k support.

Sat Jul 29 20:47:07 MDT 2000 / Russell Kroll <rkroll@exploits.org>

 - FAQ: added a note from Shaul Karl about the use of SIGPWR

Sat Jul 29 20:41:28 MDT 2000 / Russell Kroll <rkroll@exploits.org>

 - apcsmart: added the alternate cable support to forceshutdown()

 - apcsmart: now loops the GO_SMART / "SM" detection up to 5 times in
   the normal and shutdown init sequences.  This is needed because the
   lines in the alternate cable sometimes bounce which drops the
   response.  This change lets them calm down before giving up.

   Thanks to Dmitri Pogosyan for testing an earlier version of this.

Sat Jul 29 20:36:04 MDT 2000 / Russell Kroll <rkroll@exploits.org>

 - statedebug: patched by Jon Nelson to compile and run again

 - configure.ini: patch from Jon Nelson to switch off shared memory by
   using --without-shared-memory

Sat Jul 29 20:27:04 MDT 2000 / Russell Kroll <rkroll@exploits.org>

 - scripts/misc/wait4power: script from Peter strand to delay multi-user
   mode during boot until the UPS goes on line power.  This can be very
   helpful when the power keeps failing and the battery is depleted.

 - genericups: new type 11 for Powerware 3115 support.  Contributed
   by Peter strand.  Also see docs/cables/powerware.txt for hookup info.

Sat Jul 29 20:23:31 MDT 2000 / Russell Kroll <rkroll@exploits.org>

 - upsmon: patch from Shaul Karl to make the help string correct 

Sat Jul 29 20:20:25 MDT 2000 / Russell Kroll <rkroll@exploits.org>

 - optiups: new version from Ted A. Kuban, who is making it work properly

Sat Jul 29 20:16:35 MDT 2000 / Russell Kroll <rkroll@exploits.org>

 - nut.spec: update from Nigel Metheringham

Sat Jul 29 20:11:57 MDT 2000 / Russell Kroll <rkroll@exploits.org>

 - belkinups: new model for Belkin Smart-UPS units by Marcus Mueller.

Sat Jul 29 19:57:52 MDT 2000 / Russell Kroll <rkroll@exploits.org>

 - upsmon: changed the notifycmd semantics: (check your scripts!)

   Previously, the notifycmd program/script would get the message of the
   event all spread out through the args.  That's silly.  It now gets
   everything in arg 1.

   Also, for those who like to customize things, there is an environment
   variable called NOTIFYTYPE which will contain the type string 
   (ONBATT, ONLINE, etc) that triggered it.

   Finally, notifycmd only gets called for events that have EXEC set
   with NOTIFYFLAG.

 - upsmon: fixed a bug that would corrupt the password during logins.

 - upsmon: NOTIFYFLAG added to configure what happens during a NOTIFY event.
   See the example .conf as always.

 - upsmon: NOTIFYMSG makes more sense, so ignore the MSGLIST entry below

Sun Jul 16 11:25:34 MDT 2000 / Russell Kroll <rkroll@exploits.org>

 - upsmon: The messages that are sent by upsmon for different events can
   now be overridden with custom values from the config file with the
   MSGLIST directive.

 - upsmon: redid the config file parser with some new work in common.c 

Sat Jul 15 21:33:57 MDT 2000 / Russell Kroll <rkroll@exploits.org>

 - docs/access.txt: explained a subtle yet annoying problem that can
   occur when access levels are specified in a certain order.

0.44.1-pre1:

Sat Jul 15 21:12:17 MDT 2000 / Russell Kroll <rkroll@exploits.org>

 - upsmon: new switch: -i - for infinite looping after shutdown is called.
   Some systems display an ugly [FAILED] or similar when running the
   powerdown sequence since upsmon normally exits after calling shutdown.
   This switch will make it stick around so that it can be killed with
   everything else.

Sat Jul 15 21:05:51 MDT 2000 / Russell Kroll <rkroll@exploits.org>

 - upsd: no longer parses the upsd.conf with strtok.  This means it
   shouldn't clone data from one ACCESS line to the next, among other
   problems.  The jumping ACCESS-data bug was spotted by Ilia Baldine.

Sat Jul 15 20:49:02 MDT 2000 / Russell Kroll <rkroll@exploits.org>

 - conf/upsd.conf: reflects the new "extra data" for the UPS lines.
   You can now add argument information to them which upsd will ignore
   but startup scripts can use to invoke the model drivers.  This makes
   the configuration easier for package users, since you only need to
   specify those details in one place.  Patches from Shaul Karl.

Sat Jul 15 20:39:26 MDT 2000 / Russell Kroll <rkroll@exploits.org>

 - configure.in, Makefile.in, others: permissions are now based on the
   name of the user and group rather than the raw number.  The programs
   will now setuid() and setgid() based on the results of getpwnam() and
   getgrnam(), and the UID/GID values are no longer compiled into the
   binaries.  Patch from Luca Filipozzi.

Sat Jul 15 20:33:27 MDT 2000 / Russell Kroll <rkroll@exploits.org>

 - upsd: applied patch to add support to binding to a given interface
   with -i <ip>.  Contributed by Ondrej Kraus.

Sat Jul 15 20:26:50 MDT 2000 / Russell Kroll <rkroll@exploits.org>

 - engetron: no longer segfaults when called without a device name

Sat Jul 15 20:23:49 MDT 2000 / Russell Kroll <rkroll@exploits.org>

 - engetron: support for Engetron Jr models.  Contributed by 
   Adriano Roberto de Lima and Marcio Argollo F. de Menezes.

Sat Jul 15 20:22:29 MDT 2000 / Russell Kroll <rkroll@exploits.org>

 - Makefile.in: the nut.spec should now be generated sanely with
   versuffix instead of two 'version' values when setver runs.

Sat Jul 15 19:31:44 MDT 2000 / Russell Kroll <rkroll@exploits.org>

 - docs/protocol.txt: ERR UNKNOWN-COMMAND documented

 - upsd/upsfetch: "Unknown command" is now "ERR UNKNOWN-COMMAND" for
   consistency with the other errors in the protocol.

 - upsct2: also uses getpass() ala upscmd

 - upscmd: now uses getpass() instead of echoing the password to the screen

Sat Jul 15 19:22:24 MDT 2000 / Russell Kroll <rkroll@exploits.org>

 - conf/upsmon.conf: Documented the fact that you can have a power level
   of 0 and actually do useful things with it.

 - docs/genericups.txt: Type 10 didn't get included in here.  Fixed.

0.44.0:

Sat Jul 15 17:57:11 MDT 2000 / Russell Kroll <rkroll@exploits.org>

 * Version bumped up and released.

0.44.0-pre5:

Thu Jul 13 16:28:08 MDT 2000 / Russell Kroll <rkroll@exploits.org>

 - upsmon: POLLFREQ/POLLFREQALERT were clashing in the config file parser.
   Found by Boris Popov.

 - models/Makefile.in: changed to call install once per file rather than
   sending it the whole list at one time.  Spotted by Lars Balker Rasmussen.

 - clients/Makefile.in: same fix

0.44.0-pre4:

Sun Jun 25 14:38:22 MDT 2000 / Russell Kroll <rkroll@exploits.org>

 * Trimmed this file in an attempt to keep it from growing wildly.
   To go back further than this file covers, grab a 0.43.2 tarball.

 - upsmon: catch SIGQUIT and SIGTERM, then close fds before exiting
   Suggested by Boris Popov.

Sun Jun 25 14:28:45 MDT 2000 / Russell Kroll <rkroll@exploits.org>

 - genericups: Applied patch from Geoffrey Keating to fix the 
   constant "LB OL" reporting bug in the Cyberpower Power99 entry.

 - docs/powercom.txt: Added document from Shaul Karl with information
   on identifying PowerCom and related models.

Sun Jun 25 14:24:24 MDT 2000 / Russell Kroll <rkroll@exploits.org>

 - apcsmart: applied a patch for 940-0095B cable support from
   David Corbin.  Just add -c 940-0095B if you use one of these.

Sun Jun 25 14:08:40 MDT 2000 / Russell Kroll <rkroll@exploits.org>

 - Three Victron-related patches from Daniel Prynych:

 - victronups: use TIOCMGET/TIOCMSET rather than zeroing the flags.

 - genericups: New model (Victron Lite) support - number 10.

 - docs/cables/victron.txt: Cabling info for Victron models.

Sun Jun 25 13:54:52 MDT 2000 / Russell Kroll <rkroll@exploits.org>

 - upsd: Now checks for two arguments on the UPS config file entry 
   to hopefully cut down on support e-mails ...

Sun Jun 25 13:47:40 MDT 2000 / Russell Kroll <rkroll@exploits.org>

 - apcsmart: Fixed a bug where running with just "-d 0" or some other
   option without a device given would result in a segfault.  Spotted
   by David Corbin.

Sun Jun 25 13:42:06 MDT 2000 / Russell Kroll <rkroll@exploits.org>

 - upscmd: fix a segfault bug when encountering a UPS with no 
   instant commands

 - upsct2: Deal with "@ups" in RW variable list response from upsd

Sun Jun 25 13:37:27 MDT 2000 / Russell Kroll <rkroll@exploits.org>

 - upsct2: fix a bug where the RW variable list always came from the
   first/default UPS even if you specified a upsname@hostname form

 - upsct: same fix as upsc

 - upsc: deal with "no such variable" better - broken upsd config.

Sun Jun 25 13:29:30 MDT 2000 / Russell Kroll <rkroll@exploits.org>

 - docs/*, README: documentation updates to stay in sync with the code

0.44.0-pre3:

Sun Jun 11 18:31:18 MDT 2000 / Russell Kroll <rkroll@exploits.org>

 - bestfort: changed CTRL('q') around to be portable.  Linux libc5 
   doesn't like this, and other systems are likely to complain too. 

Sun Jun 11 17:52:54 MDT 2000 / Russell Kroll <rkroll@exploits.org>

 - models/mustekups: new driver for Mustek Electronics units from
   Jeremy Maccelari.

Sun Jun 11 17:48:35 MDT 2000 / Russell Kroll <rkroll@exploits.org>

 - Makefile.in: setver target updated to handle the new style nut.spec.

Sun Jun 11 17:26:06 MDT 2000 / Russell Kroll <rkroll@exploits.org>

 - models/bestfort: new driver for older Best Fortress models added.
   Contributed by Grant Taylor.

 - models/Makefile.in: reworked this to use a generic target of *.c to
   make it a lot easier to maintain.

Sun Jun 11 17:10:14 MDT 2000 / Russell Kroll <rkroll@exploits.org>

 - docs/access.txt: updated to reflect the return of the MASTER level.

Sun Jun 11 17:02:20 MDT 2000 / Russell Kroll <rkroll@exploits.org>

 - upsmon: Figured out the master setting problem, so it's ready for
   a testing release.  Note that the MASTER security level is back, so
   check those syslogs after firing this thing up.  If it complains, 
   edit your upsd.conf and grant it "master" access, not just "login"!

Sun Jun 11 16:47:04 MDT 2000 / Russell Kroll <rkroll@exploits.org>

 - fentonups: fixed the "setinfo: can't find type 1" which means this
   model again has a valid INFO_MFR setting.

Wed Jun  7 19:08:39 MDT 2000 / Russell Kroll <rkroll@exploits.org>

 - CREDITS: relearned my ABCs and alpha sorted the thing properly.

Sun Jun  4 12:53:21 MDT 2000 / Russell Kroll <rkroll@exploits.org>

 - upsmon: shutdown code re-enabled with the new multi-UPS design

 - upsmon: FSD in the status is now recognized and treated as a critical UPS

Sun Jun  4 11:24:36 MDT 2000 / Russell Kroll <rkroll@exploits.org>

 - apcsmart: expanded capabilities buffer from 256 to 512 chars to handle
   large strings returned by newer APC models.  Found by Nigel Metheringham.

 - packaging/RedHat/nut.spec: replaced with fresh version from 
   Nigel Metheringham.

Thu Jun  1 20:06:44 MDT 2000 / Russell Kroll <rkroll@exploits.org>

 - upsd: FSD now supported for multi-UPS forced shutdown handling

   Let's say machine A draws power from UPS 1 and UPS 2.  UPS 2 goes
   critical and machine A can no longer run, so it shuts them down.
   Now let's say machine B is also plugged into UPS 1.  Without FSD, 
   it'll barrel right on with no idea that A is about to command it off.
   With this code, it'll shut down before anything bad happens.

   This is only really useful with mixed power environments right now.

Thu Jun  1 19:23:34 MDT 2000 / Russell Kroll <rkroll@exploits.org>

 - bestups: Applied patch from Jon Nelson to map "PRO" to "Patriot Pro".

Mon May 29 13:58:27 MDT 2000 / Russell Kroll <rkroll@exploits.org>

 - upsmon.conf: documented DEADTIME and fixed the documentation for
   SHUTDOWNFLAG - it's not just for simple signalling models...

Mon May 29 13:49:07 MDT 2000 / Russell Kroll <rkroll@exploits.org>

 - upsmon: DEADTIME added.  This defines how long a UPS may go stale 
   before it's considered dead.  This is similar to the staleness controls
   in upsd itself, but this one is a bit more important.

   Specifically, any UPS marked "dead" will be upgraded from a low battery
   status to a low battery + on battery.  If this causes the overall power
   value to drop below the minimum, the system will be shut down.

   Note: this does not mean that killing upsd or temporarily disconnecting
   the serial cable from your UPS will shut down the system.  You have
   to do something like that while running on battery for it to trigger.

   My advice is to leave those things alone when running on battery...

0.44.0-pre2:

Mon May 29 13:12:02 MDT 2000 / Russell Kroll <rkroll@exploits.org>

 - upsmon: a few more debug-scaffolding things have been tweaked while
   working with the dummy driver.  This program still isn't ready for
   prime time, so the warning from -pre1 applies.

Sat May 20 14:37:32 MDT 2000 / Russell Kroll <rkroll@exploits.org>

 - upsmon: more multi-UPS development.  Things get interesting when a 
   UPS that's providing a critical source of power disappears on you.
   More work in this area is needed.

Sat May 20 13:50:57 MDT 2000 / Russell Kroll <rkroll@exploits.org>

 - models/: new "driver": dummyups

   This program will create a fake UPS that you can use to test things
   without subjecting your real UPS to a battery drain.  This is mostly
   due to the upsmon testing, but other people may find it useful.   
   It uses Xdialog for the interface.  You can get it at this site:

   http://xdialog.free.fr/

   Note that this program is not built automatically.  You must
   make dummyups by hand in the drivers subdirectory.

Sat May 13 13:36:15 MDT 2000 / Russell Kroll <rkroll@exploits.org>

 - upslog: %ETIME% now available to print the epoch time.  Suggested
   by Chad Madison.

0.44.0-pre1:

Sun May  7 15:19:23 MDT 2000 / Russell Kroll <rkroll@exploits.org>

 - configure.in: changed with-driverpath to with-modelpath for consistency.

   Various other changes to make the INSTALLROOT= stuff work cleanly.
   Basically, you can do 'INSTALLROOT=/foo/bar make install' and it'll
   all land in the directory trees *under* /foo/bar.  Then you just 
   build a package in there and it's done.

Sun May  7 14:25:40 MDT 2000 / Russell Kroll <rkroll@exploits.org>

 * BIG "I told you so" WARNING: upsmon is purposely broken for this
   prerelease.  It's either that or keep you guys waiting another week.
   You can remove the exit(1) in main and try out the multi-monitoring
   code, but realize that it _will_ _not_ _shut_ _down_ the box!

   So, don't kill off your 0.43.2 upsmon binaries!  "make install" has 
   been tweaked to not copy it over, so you're safe there.

   You have been warned!

Sun May  7 14:10:46 MDT 2000 / Russell Kroll <rkroll@exploits.org>

 * Applied a jumbo patch from Nigel Metheringham:

   - INSTALLROOT added to the Makefiles so a relative install is now 
     possible.  This should be useful for packaging the program.

   - configure now accepts --with-driverpath to install the model drivers
     somewhere other than the normal "bin" directory.

   - configure --with-cgipath lets you move the CGI binaries somewhere else
     without affecting the other binaries.

   - The other UPS drivers now have the -d <num> option to define how 
     long to wait before powering off.  This was originally only in
     apcsmart.  -d0 will exit without waiting.

   - The RPM spec file has been reworked into three packages:

     nut        - client software
     nut-server - server software
     nut-cgi    - CGI tools

     Incidentally, there is no "official" maintainer of the spec file
     yet.  If someone wants to take care of it formally, let me know.
     Right now it's just been slapped together from contributed patches.

   - The RH6.0 scripts have been updated to handle powerdown situations.

   - apcsmart: Capability strings > 256 chars (SU1000RMI2U units) 
     are now handled properly and checking code has been added to 
     handle future overruns.

   - apcsmart: Alternate shutdown sequence is available with -s for these 
     newer models which have a different kind of race when power returns 
     at the worst possible time.

Sun May  7 13:54:55 MDT 2000 / Russell Kroll <rkroll@exploits.org>

 - ups-trust425+625: added a dire warning about this driver being
   unsupported.  It's been largely unchanged since before the -k 
   code went into the other drivers (August 1999, see older Changes
   entries) and has some other problems (battery %) too.

   Hopefully someone using this driver will step up and adopt it.  I
   don't have that kind of hardware here, so fixing it is basically
   not an option for me.

Thu Apr 27 07:30:58 MDT 2000 / Russell Kroll <rkroll@exploits.org>

 * New mailing list: upsdev@lists.exploits.org.  Discussion there 
   is focused on development issues.  The usual ups@lists.exploits.org
   address should be used for normal support items.

   Contact majordomo@lists.exploits.org to subscribe.

Wed Apr 26 18:42:27 MDT 2000 / Russell Kroll <rkroll@exploits.org>

 - configure.in: Applied patch from Bill Carlson to fix the linking issues
   on RH6 boxes for gd.  They need libX11 and libttf sometimes, and this
   new patch only puts them in when needed.

Sun Apr 23 18:13:31 MDT 2000 / Russell Kroll <rkroll@exploits.org>

 - upsmon: major overhaul begins.  Systems to monitor are now listed in
   the upsmon.conf, and have a number of additional details such as their
   "power value" - number of power supplies they run.

Sun Apr 23 15:32:19 MDT 2000 / Russell Kroll <rkroll@exploits.org>

 - upscommon/all models: send/recv changed to upssendchar and upsrecv to
   avoid stepping on NetBSD libc functions and other possible namespace
   conflicts.  Suggested by Will Ferry.

Sun Apr 23 14:33:24 MDT 2000 / Russell Kroll <rkroll@exploits.org>

 - apcsmart: added handler for when some models ignore ^Z.  Tested and
   contributed by Will Ferry.

0.43.2:

Sun Apr 16 19:51:27 MDT 2000 / Russell Kroll <rkroll@exploits.org>

 - apcsmart: Fixed a small problem where INFO_STATUS would have bogus
   information for about a second upon startup.

Sun Apr 16 18:02:29 MDT 2000 / Russell Kroll <rkroll@exploits.org>

 - nut.spec: updated version from Andreas Piesk.  This file still needs
   an "official" RH user to keep it sane.  I have a lot of systems, but
   nothing running Red Hat, so it can't be tested from this end.

 - apcsmart: applied a patch from Andreas Piesk to clean up double help text

Sun Apr  9 14:43:52 MDT 2000 / Russell Kroll <rkroll@exploits.org>

 - genericups: Updated type 1 so it's only a 0095A/C type cable support
   with the right flags for low battery detection.  For some reason, the
   940-0095B cable provided with my Back-UPS Pro refuses to change state
   when the UPS hits low battery.  Very strange.

   Low battery flag problem spotted by Jirka Chraska.

Sun Apr  9 14:19:43 MDT 2000 / Russell Kroll <rkroll@exploits.org>

 - apcsmart: fixed a few init-time errors - some calls were sending the
   wrong request characters to the UPS...

0.43.2-pre2:

Sat Apr  8 15:53:14 MDT 2000 / Russell Kroll <rkroll@exploits.org>

 - apcsmart: lengthened the delay between characters for the OFF command
   so it should work predictably now.

 - upsd: corrected a bug keeping instant commands from working that was
   caused by an earlier cleanup and referencing a now-unused variable.

Fri Apr  7 21:09:52 MDT 2000 / Russell Kroll <rkroll@exploits.org>

 - apcsmart: CMD_OFF must now be reissued after 3 seconds but before
   15 seconds have passed to be sure it doesn't happen accidentally.
   This was put in since it's going to be *very* easy to hit that 
   choice in the web controller, and I'm not about to kill my production
   machines during testing.

   If this bugs you, #undef CONFIRM_DANGEROUS_COMMANDS in apcsmart.h.

Fri Apr  7 20:54:25 MDT 2000 / Russell Kroll <rkroll@exploits.org>

 - upscommon/apcsmart: addenum added to handle the varying amount of 
   options being returned by APC's product line.  The number of options
   for a given option are no longer hardcoded to 4 - rather, it's whatever
   the UPS returns, which is far saner.   

Thu Apr  6 13:49:04 MDT 2000 / Russell Kroll <rkroll@exploits.org>

 - upsset: added the description fetching code so the command chooser
   says things like "Start battery test" rather than "BTEST1".

Tue Apr  4 10:55:41 MDT 2000 / Russell Kroll <rkroll@exploits.org>

 - upsset: added instant command listings and a "function" selector
   to the bottom part where you choose a UPS so you can get there.
   Note that you can't actually invoke the commands with this thing yet.

 - upsset: cleaned up error pages to use a common function

Tue Apr  4 09:04:06 MDT 2000 / Russell Kroll <rkroll@exploits.org>

 - upsmon: Should no longer proclaim "startup successful" twice now.

 - genericups: Now handles "missing shutdown flags" situations better
   and doesn't print a false warning on certain models.  None != undefined.

 - upsmon: Telling strchr to look for \0 is generally a bad idea.  Fixed.

Wed Mar 22 19:51:19 MST 2000 / Russell Kroll <rkroll@exploits.org>

 - conf/upsd.conf: There's now a stock UPS entry to hopefully catch people
   who install the software and try to run it without editing the
   configuration files.  It happens.

Mon Mar 20 14:15:03 MST 2000 / Russell Kroll <rkroll@exploits.org>

 - apcsmart: Added another short delay to the setident() function so
   that older models (that Matrix-UPS of mine again...) won't drop the
   next command byte.

Mon Mar 20 14:05:01 MST 2000 / Russell Kroll <rkroll@exploits.org>

 - apcsmart: now recognizes older Matrix-UPS units automatically

 - apcsmart: capabilities reworked to handle older units better and
   cut down on some wasteful code.

 - upscommon: new function - setflag() - for changing the flags after adding.

0.43.2-pre1:

Sun Mar 19 15:12:12 MST 2000 / Russell Kroll <rkroll@exploits.org>

 - multimon: removed strtok() in the FIELD parsing code.

Sun Mar 19 15:01:23 MST 2000 / Russell Kroll <rkroll@exploits.org>

 - clients/*: switched from strtok() to strchr() in most of the code.

 - upsset: fixed a cosmetic bug where the table with all the dropdown
   boxes was left-justified and looked strange when the dropdown box
   for host names was wide enough.

Sun Mar 19 14:18:05 MST 2000 / Russell Kroll <rkroll@exploits.org>

 - upsd: switched every call to strtok() around so now it uses strchr.
   That lingering pointer in strtok is just a problem waiting to happen
   if a nested call should ever arise.

   Also cleaned up a lot of <varname>[@<upsname>] parsing into a common
   block of code for readibility and to save space.

   During this cleanup, a few small memory leaks (strdups without frees)
   were spotted and exterminated.

Sun Mar 19 13:46:53 MST 2000 / Russell Kroll <rkroll@exploits.org>

 - models/: Added the experimental ipt-anzen driver from Travis Tabbal.
   This looks similar to the Opti-UPS protocol, so it may be a solution
   for supporting those models eventually.

 - genericups: Added 940-0023A cable support as type 9.  Thanks to
   Alissa Rogers for testing this one out and providing the right flags.

Sun Mar 19 13:02:26 MST 2000 / Russell Kroll <rkroll@exploits.org>

 - models/: Added the victronups driver from Radek Benedikt.

Sun Mar  5 19:51:42 MST 2000 / Russell Kroll <rkroll@exploits.org>

 - clients/cgilib.c: changed extractcgiargs() around so it can now handle
   variables without values.  Previously it would print an error which
   makes most web servers choke since it's before the Content-Type header.

Sat Feb 26 21:37:05 MST 2000 / Russell Kroll <rkroll@exploits.org>

 - conf/Makefile.in: The path should be $(CONFPATH), not $(BASEPATH)/etc.
   Spotted and fixed by Luca Filipozzi.

0.43.1:

Tue Feb 22 13:16:44 MST 2000 / Russell Kroll <rkroll@exploits.org>

 - apcsmart: minor code cleanup to not pass an unused variable

 - fentonups: the NULL entry now has all the right initializers

0.43.1-pre1:

Sun Feb 13 20:16:37 MST 2000 / Russell Kroll <rkroll@exploits.org>

 - upslog: applied patch from Matthew Gabeler-Lee to support customizable
   log formats.  This means it'll work on models without temperature
   readings, among other things.  The old format is also available for
   compatibility with existing setups.

Sun Feb 13 20:06:16 MST 2000 / Russell Kroll <rkroll@exploits.org>

 - conf/Makefile.in: files with passwords and other sensitive data are
   now installed with a mode that should keep prying eyes away.

 - bestups: added CMD_BTEST0 support.

 - fentonups: added CMD_BTEST0 support.

Thu Feb 10 14:35:35 MST 2000 / Russell Kroll <rkroll@exploits.org>

 - configure.in: Disabled the -lXpm checks since it was linking in
   that library on every system with libXpm.a rather than just those
   that actually need it for gd.  This needs to be rewritten to only
   trigger on those specific systems.

 * Switched to using install rather than cp and mkdir.

Thu Feb 10 12:35:57 MST 2000 / Russell Kroll <rkroll@exploits.org>

 * The source tree now sports a common directory.  This is where some 
   of the duplicate functions like background() will live.

Thu Feb 10 12:29:01 MST 2000 / Russell Kroll <rkroll@exploits.org>

 - apcsmart: cleaned up CAL0/CAL1 so you can't stop calibration when
   it's not running, and you can't start it when it's already running.
   The reason - APC uses the same character to toggle calibration mode.

Sun Feb  6 21:34:25 MST 2000 / Russell Kroll <rkroll@exploits.org>

 - upsd/apcsmart: Also added CMD_CAL0 and CMD_CAL1 - stop/start calibration.

 - upsd/apcsmart: CMD_OFF and CMD_ON now supported - instant ON and OFF.
   Yes, this does mean you can kill your load remotely now if desired.  
   Use with caution.

Sun Feb  6 21:12:24 MST 2000 / Russell Kroll <rkroll@exploits.org>

 - apcsmart: 'silent fail' models now get instant commands.
 
 - upsd: bugfix: SET with no arguments no longer crashes the program.
   You'd need manager access to do this via a raw telnet, but it's 
   still annoying.

 - upsset: sscanf is no longer used on network data here either.

Sun Feb  6 20:39:55 MST 2000 / Russell Kroll <rkroll@exploits.org>

 - upsd: sscanf is no longer used to parse network data.  Yikes.

Sun Feb  6 20:19:14 MST 2000 / Russell Kroll <rkroll@exploits.org>

 - configure.in: --enable-celsius is gone (it was previously depreciated)

 - upsstats/multimon: USE_CELSIUS is gone.  Use TEMPC or TEMPF in your
   configuration files to force the use of one scale or the other.

 - multimon: Added handling for a condition where hosts.conf doesn't
   exist - it now returns a proper error rather than dying miserably.
   Spotted by Jirka Chraska.

0.43.0:

Sun Feb  6 15:13:39 MST 2000 / Russell Kroll <rkroll@exploits.org>

 - upscmd: fixed a bug where trying to list instant commands on a UPS
   without any would cause a segmentation fault.

0.43.0-pre3:

Fri Feb  4 08:01:12 MST 2000 / Russell Kroll <rkroll@exploits.org>

 - bestups: fixed a bug that cropped up after the info access cleanups
   that caused MFR MODEL and STATUS to be blank.

Thu Feb  3 15:00:30 MST 2000 / Russell Kroll <rkroll@exploits.org>

 - docs/: updates to various documents to stay synced with the source

Tue Feb  1 19:27:01 MST 2000 / Russell Kroll <rkroll@exploits.org>

 - genericups: similar info[] cleanups like the bestups driver below

 - bestups: removed direct access to info[] in favor of addinfo/setinfo

Tue Feb  1 19:18:26 MST 2000 / Russell Kroll <rkroll@exploits.org>

 - fentonups: cleaned up the "Unknown" detection code and the info[] 
   access calls in general.

Tue Feb  1 18:53:39 MST 2000 / Russell Kroll <rkroll@exploits.org>

 - apcsmart: info[] access cleanups to compliment the upscommon changes.

 - upscommon: create_info() now clears out the array and sets member 0
   to INFO_MEMBERS (the max count).  This gets rid of a lot of duplicate
   code in the models.

Tue Feb  1 18:39:45 MST 2000 / Russell Kroll <rkroll@exploits.org>

 - upsd: fixed a small cosmetic bug when it did syslog before openlog
   at startup, giving us things like this:

   syslog: Data source for UPS [bup280]: SHM (11649)

 - fentonups: LOWXFER and HIGHXFER should only show up when a model is
   found in the table (see .h file) and not when it's merely "Unknown"

 - bestups: support for BOOST and TRIM based on the nominal input 
   voltage added.

0.43.0-pre2:

Tue Feb  1 18:05:05 MST 2000 / Russell Kroll <rkroll@exploits.org>

 - bestups: added the BTEST1 instant command

Tue Feb  1 15:50:33 MST 2000 / Russell Kroll <rkroll@exploits.org>

 - fentonups: Added support for another UPS that speaks the same 
   protocol.  The "PowerGuard PG-600" should now be recognized.
   Info contributed by Tapio Heiskanen.   

Mon Jan 31 11:43:24 MST 2000 / Russell Kroll <rkroll@exploits.org>

 - upscmd: new client program to send instant commands

Tue Jan 25 21:14:43 MST 2000 / Russell Kroll <rkroll@exploits.org>

 - include/upscommon.h: squashed another lingering part of the old 
   planned UPSCMD_SDD command.

0.43.0-pre1:

Tue Jan 25 20:51:55 MST 2000 / Russell Kroll <rkroll@exploits.org>

 * How to test these new commands:

   There's no client side written yet since it's oh so simple to do with
   telnet.  First telnet to your upsd, do PASSWORD <whatever>, and then
   LISTINSTCMD or LISTINSTCMD <upsname>.  Then do INSTCMD <upsname>.

   If you want to know what a command does, use INSTCMDDESC <cmdname>.

   You'll need manager access for all this, so get those ACLs cooking...

Tue Jan 25 20:38:57 MST 2000 / Russell Kroll <rkroll@exploits.org>

 - upsd: new network protocol command: INSTCMDDESC

 - include/shared.h: the old CMD_SDD is now dead.  "Instant commands"
   will implement the functionality that had been planned with that ID.

 - upsd/apcsmart/fentonups: more instant command support ...

   CMD_FPTEST in apcsmart
   CMD_BTEST1 in apcsmart and fentonups

 - upsd: new network protocol commands: INSTCMD, LISTINSTCMD

Sun Jan 23 21:13:08 MST 2000 / Russell Kroll <rkroll@exploits.org>

 * Initial "instant command" message structure support added.  New 
   definitions related to this are in include/shared.h.

0.42.2:

Thu Jan 20 08:40:10 MST 2000 / Russell Kroll <rkroll@exploits.org>

 - configure.in: removed lingering traces of the old GIF/PNG selection code

Wed Jan 19 11:21:13 MST 2000 / Russell Kroll <rkroll@exploits.org>

 - bestups: Added "maxtries" so the sync/ident phases won't keep printing
   dots forever when the UPS is gone or being stubborn.

 - bestups: Now recognizes the Fortress Telecom (FTC) models properly.

0.42.2-pre3:

Mon Jan 17 19:58:30 MST 2000 / Russell Kroll <rkroll@exploits.org>

 - */Makefile.in: autoconf gives us -O in $(CFLAGS) for gcc anyway, 
   so it's no longer forced in the stock files.  Also now it tests for
   gcc and only uses -Wall when it's found.  That should also make 
   compiles happy on IRIX.

 - upscommon: all speed setting is now done with cfsetispeed and
   cfsetospeed rather than manually ORing it in tio.c_cflag.  This
   should give better results on IRIX boxes.

Mon Jan 17 19:45:09 MST 2000 / Russell Kroll <rkroll@exploits.org>

 - upsimage: fixed an "all red" utility display when the UPS model being
   graphed didn't give low and high transfer voltage data.

Mon Jan 17 12:16:04 MST 2000 / Russell Kroll <rkroll@exploits.org>

 - bestups: Applied a quick fix patch from Mark Wagner for models 
   with 4 digit VA readings.    

0.42.2-pre2:

Sun Jan 16 11:33:45 MST 2000 / Russell Kroll <rkroll@exploits.org>

 - multimon.cgi/upsset.cgi/upsimage.cgi: All colors are now set in the
   BODY tag so it shouldn't look bad due to the "partial color override"
   effect.

Sat Jan 15 19:40:41 MST 2000 / Russell Kroll <rkroll@exploits.org>

 - upsset.cgi: Various markup changes for HTML 4.0 compliance

Sat Jan 15 18:35:03 MST 2000 / Russell Kroll <rkroll@exploits.org>

 - upsd: string concatenation cleanups

 - multimon.cgi: cleaned up the status display code a little

 - upsd: A warning is now given if any of the UPS data sources are stale
   at startup.  This should help catch the cases where typos or other
   invalid pathnames are given, which circumvent the normal "no UPSes
   listed" checking.

Sat Jan 15 15:35:18 MST 2000 / Russell Kroll <rkroll@exploits.org>

 - genericups: Hmm, this is "Network UPS Tools", not "Generic UPS Tools".

 - genericups: Nitram Elite UPS models now supported as type 8.  Thanks
   to Patrick Dupre for testing and debugging this on his hardware.

 - upslog: Now closes and reopens the log file on SIGHUP.  This should
   now make automatic log rotation possible without restarting the 
   entire program.

Sat Jan 15 15:08:32 MST 2000 / Russell Kroll <rkroll@exploits.org>

 - apcsmart: applied fix from Yury Shevchuk so it won't choke on 
   the front panel language capabilities on newer Matrix-UPS models.

 - scripts/: There's now a FreeBSD directory with a sample script for
   starting up the model driver, upsd, and so on.

 - configure: Applied patch from Bill Carlson to make gd link properly 
   when TrueType support has been compiled into the library.  This patch 
   also fixes the case where gd has been compiled with Xpm support.

 - configure: --enable-celsius is now officially depreciated.  It will
   disappear in the future, so start using TEMPC and TEMPF in your
   multimon.conf now.  This is being done to make life easier for the
   package-generating users.

 - apcsmart: Fixed "!" async notifier character bug

 - upscommon: "spew limiter" allowed much more buffer room.  This should
   fix the capability reading problem on Smart-UPS RM units.

 - upsfetch: Error #defines now in the .h file, also they have been
   renamed to include a UPSF_ prefix to avoid namespace clashes.

 - docs/: More tips in the FAQ, plus new document data-room.txt

0.42.2-pre1:

Sat Jan 15 14:22:05 MST 2000 / Russell Kroll <rkroll@exploits.org>

 - upsset.cgi: now sends PASSWORD and SET.  This means it should be usable
   for changing parameters around at last.

Tue Jan 11 14:16:43 MST 2000 / Russell Kroll <rkroll@exploits.org>

 - upsset.cgi: expanded to support logins, UPS selection, and everything
   but actually sending the PASSWORD and SET commands.  See the example
   upsset.passwd file before using this.

Sat Dec  4 19:57:49 MST 1999 / Russell Kroll <rkroll@exploits.org>

 - Packaging changes - there is now a packaging directory for things
   like the Red Hat .spec file and so on.  This should keep the top level
   from getting too cluttered as various distributions add their pieces.

0.42.1:

Fri Nov 26 11:59:10 MST 1999 / Russell Kroll <rkroll@exploits.org>

 - upscommon: applied patch from Boris Popov to fix the ispeed and ospeed
   lines on the second open() call, since FreeBSD apparently clears it
   at the close().

0.42.1-pre3:

Sat Nov 20 16:10:50 MST 1999 / Russell Kroll <rkroll@exploits.org>

 - configure.in: now tries -L/usr/local/lib -I/usr/local/include when
   gd isn't found by default.  This should get those pesky CGI compiles
   running happily on FreeBSD boxes.

Sat Nov 20 14:06:06 MST 1999 / Russell Kroll <rkroll@exploits.org>

 - apcsmart: Matrix-UPS capability parsing code added

Sat Nov 20 13:30:08 MST 1999 / Russell Kroll <rkroll@exploits.org>

 - configure/upsimage: GIF support is gone.  It's PNG or nothing now.

 - upscommmon: reworked the serial line setting code so that OS-specific
   controlling bits aren't lost when calling TIOCMSET.

 - apcsmart: applied "silent failure" detection patch for older models 
   from Matthew Gabeler-Lee

 - upscommon: added catch for SIGSYS on FreeBSD boxes without SysV messaging

0.42.1-pre2:

Sun Nov 14 15:49:15 MST 1999 / Russell Kroll <rkroll@exploits.org>

 * Be patient when setting variables.  It takes a second or two for
   the model driver (apcsmart) to get the UPS set to the new value.

 * Only the apcsmart driver supports variable setting.  Other models
   either don't support it in the hardware or don't have a documented
   interface for changing the internal settings.

 - upsct2: New argument: -s <varname>.  The password it asks for is the
   one specified on the ACCESS line with manager access (see below).
   <varname> is something like UPSIDENT - run upsct2 without any args
   to see the possible values.

 - apcsmart: New variable: LINESENS - controls the sensitivity in the UPS

 - upsd: New command: SET.  Use this to set values in your UPS.
   Requires MANAGER level access.

   Here's how you can have two passwords for the same host, so that
   upsmon doesn't have any more access than it really needs:

   ACL myhost 10.0.0.1/32
   ACCESS grant login myhost upsmonpw
   ACCESS grant manager myhost managerpw

 - apcsmart: Now executes SET commands received via the SysV message queue

Sun Nov 14 10:15:00 MST 1999 / Russell Kroll <rkroll@exploits.org>

 - genericups.h: Added CyberPower Power99 support as type 7.

Thu Nov 11 16:29:03 MST 1999 / Russell Kroll <rkroll@exploits.org>

 - genericups.h: Added Best Patriot support as type 6 with info from
   Brian Craft.

 - Makefile.in/nut.spec: Applied patch from Brian Crafts to change 
   the chown procedure for the state directory.  Now it should be 
   friendlier during RPM builds from the .spec file.

Tue Nov  9 12:39:34 MST 1999 / Russell Kroll <rkroll@exploits.org>

 - */Makefile.in: CC = @CC@, rather than = gcc, for portability's sake.

Fri Nov  5 18:08:18 MST 1999 / Russell Kroll <rkroll@exploits.org>

 - apcsmart: moved lowxfer/highxfer/upsident out of the capabilities
   check for "silent failure" models - they support it, but only as
   single read-only values...

 - configure.in: ^dialer:, not just ^dialer, in case multiple groups 
   exist on FreeBSD systems that match dialer* ...

 - genericups: expanded the info struct somewhat to stop the "can't add"
   messages at startup

 - fentonups: added info for the PowerOn and PowerPure.  Also reworked the
   voltage ranges to have it all set in the .h file.

Fri Nov  5 17:26:48 MST 1999 / Russell Kroll <rkroll@exploits.org>

 - genericups: Applied patch for Tripp Lite Internet Office support
   from Stephen Brown.
 
 - multimon: Applied patch from Matthew Gabeler-Lee to add the "refresh" 
   argument for automatic reloading of the web pages with HTTP meta-tags.

Fri Nov  5 14:47:18 MST 1999 / Russell Kroll <rkroll@exploits.org>

 - */Makefile.in: more FreeBSD stuff - CFLAGS now propagates down into the
   subdirectories to bring the all-important -I and -L flags into the game.

   Hint: to make this compile cleanly on a default system that doesn't know
   about /usr/local/include and so forth, use this command for configure:

   CFLAGS="-I/usr/local/include -L/usr/local/lib" \
   CPPFLAGS="-I/usr/local/include -L/usr/local/lib" ./configure

0.42.1-pre1:

Fri Nov  5 08:41:57 MST 1999 / Russell Kroll <rkroll@exploits.org>

 - configure.in/acconfig.h/upscommon: FreeBSD uu_lock changes (again)...

   The configure script will now properly detect uu_lock in libutil.h
   and enable the right bits of code *and* set the default gid to dialer.

0.42.0:

Sun Oct 31 12:57:34 MST 1999 / Russell Kroll <rkroll@exploits.org>

 - scripts/RedHat-6.0/ups: applied patch to this script for 
   master/slave operation from Bo Kersey.

 - apcsmart: protocol level adjustments for older Smart-UPS units that
   don't do the ^A or ^Z but seem to handle just about everything else

0.42.0-pre2:

Sat Oct 30 20:06:24 MDT 1999 / Russell Kroll <rkroll@exploits.org>

 - bestups: switched to tcsetattr to make it compile on BSD/OS

 - apcsmart/upsd: added INFO_WAKEDELAY - seconds until the UPS turns
   on the load after it powers up.

Sat Oct 30 17:57:02 MDT 1999 / Russell Kroll <rkroll@exploits.org>

 - apcsmart: the shutdown code now checks the line status and sends
   either the "soft shutdown" or "shutdown and return" depending on 
   whether it's still on battery at that point.  This should fix the
   "UPS turns the load back on while the utility is still gone" bug.

 - apcsmart: new parameter: -d - sets the number of seconds to wait
   after sending the final shutdown command.  If you want the program
   to exit immediately, use -d 0.

 - upsd: new config parameter: MAXAGE - set the number of seconds that
   can pass before a data source is marked stale.  This is very handy on
   those troublesome models that take forever to respond or just drop 
   replies periodically.

   Most people should never need to use this.

 - upscommon: simplified the skipping of ignored characters in recv()

 - upscommon: cleaned up some lingering alarms in recv()

 - upsmon: dumped all that dynchar stuff in favor of strdup or just
   using the result directly.  

Sat Oct 30 15:10:45 MDT 1999 / Russell Kroll <rkroll@exploits.org>

 - several models: Moved openlog() up so shutdown syslog messages look good

 - bestups: Added shutdown functionality with standard -k call

Fri Oct 29 09:37:25 MDT 1999 / Russell Kroll <rkroll@exploits.org>

 - bestups: new model for Best Power Fortress models.  

   Note: this driver tends to set off the "data stale" warnings of upsd.  
   The UPS tends to play the "la la la I can't hear you" game every few 
   minutes, and ignores my queries.  After 3 of these (3 * 5 = 15...), 
   upsd declares it stale and drops it, only to typically pick it up 
   a few seconds later.

   upsd will undoubtedly gain an option here sooner or later to back off
   the staleness check for these stranger models.  That will also help
   matters in the optiups camp, where all replies must wait 20 seconds.

   Again, any information on this bizarre behavior would be appreciated.

   Note 2: the shutdown command (-k) is not implemented yet.

 - docs/access.txt: Fixed the reversal of access level / ACL name in the
   examples.  Spotted by Bo Kersey.

 - genericups: One & goes a long way.  linenorm ioctl bug fixed.

   Also moved the upsfd sanity check ABOVE the ioctl, so we know about a
   problem due to an open before ioctl squashes errno with its own problem.

0.42.0-pre1:

Sat Oct 23 18:18:15 MDT 1999 / Russell Kroll <rkroll@exploits.org>

 - upscommon: Fixed a bug where writeinfo would choke during the SHM
   pointer storage phase on BSD/OS

 * If anyone knows why the Opti-UPS units wait 20 seconds (!) to reply
   to a query, I'd love to hear about it.  The driver provided in this
   tree is worthless without gutting the delay functions in upscommon
   and upsd due to this enormous turnaround time.

   Such are the dangers of hacking your own driver without protocol docs...

 - cgilib.o: cleaned up the old and ugly extractcgiargs() routine

 - clients/: dumped the common CGI routines into cgilib.o

 - upsd: Having state files on the command line has been removed.  It
   was previously depreciated code.  All users must now switch to the
   UPS myups /var/state/ups/... style in the upsd.conf.

   Also added an error to catch people who start upsd without any 
   state files defined.

 - upsset.cgi: New CGI program to handle setting of variables and so forth.
   Currently read-only.

 - upsct2: New client program for debugging and testing the RW variable 
   code.  It's closely related to upsset.cgi, and is read-only for now too.

Sat Oct 23 13:52:59 MDT 1999 / Russell Kroll <rkroll@exploits.org>

 - upsd: made do_sendhelp use netcmds[] rather than a hardcoded string

 - docs/: Updated documentation to keep it in sync with the source

Sat Oct 23 13:16:07 MDT 1999 / Russell Kroll <rkroll@exploits.org>

 - upsmon: ripped out the MASTER priv-setting code

 - upsd: ripped out the old MASTER/SHUTDOWNDELAY code

Sun Oct 17 17:20:47 MDT 1999 / Russell Kroll <rkroll@exploits.org>

 - upscommon: cleaned up some of the syslog notices

 - apcsmart: now reads the ^Z capability string for the ENUM values

Sun Oct 17 15:29:01 MDT 1999 / Russell Kroll <rkroll@exploits.org>

 - upscommon: changed the upsport/portname use around to hopefully
   fix a LCK..(null) problem that was popping up on FreeBSD systems

Sun Oct 17 14:52:08 MDT 1999 / Russell Kroll <rkroll@exploits.org>

 - This package now has a real name that doesn't have anything to do with
   APC: Network UPS Tools, or NUT.  This makes the tarballs nice and short
   too.  Credit for the name goes to Kern Sibbald <kern@sibbald.com> ...

   It'll take a little while to shake out all the references to the old
   name, but they'll eventually be replaced.

Sun Oct 17 14:48:14 MDT 1999 / Russell Kroll <rkroll@exploits.org>

 - ups-trust425-625: rolled the upscommon-addon stuff back into this
   model's source files, since those functions aren't common at all.

   Note to module authors: upscommon should contain functions that get
   used by more than one module to save on code bloat among other things.

Sun Oct 17 14:27:23 MDT 1999 / Russell Kroll <rkroll@exploits.org>

 - apcsmart: new model for combined support of all APC models that use
   their "smart signalling" protocol.  This replaces the earlier "smartups"
   and "backupspro" drivers.  This driver should also handle higher 
   models such as the Matrix-UPS, but it has not been tested on them.

Fri Oct 15 20:08:36 MDT 1999 / Russell Kroll <rkroll@exploits.org>

 - upsstats: "UPS Output", not "UPS Input"... spotted by Daniel Roesen.

 - upscommon: Hopefully fixed another compile problem with the uu_lock() 
   code...

 - genericups: Added Centralion CL-750 support (type 5) with info 
   provided by Neil Muller <neil@zeta.mth.uct.ac.za>

 * Back after far too long.  Never mix a move, a vacation, and software
   development unless you like annoying people.

Mon Sep 13 23:08:54 MDT 1999 / Russell Kroll <rkroll@exploits.org>

 - genericups: Updated Upsonic entry for cable power and shutdown flags

Sun Sep 12 01:56:46 MDT 1999 / Russell Kroll <rkroll@exploits.org>

 - upsd: new protocol commands: LISTRW, VARTYPE, VARDESC, ENUM

 - upscommon: addinfo changed to accomodate read/write variable details

 - smartups: r/w variable modifications - LOWXFER, HIGHXFER, UPSIDENT

Sat Sep 11 19:53:25 MDT 1999 / Russell Kroll <rkroll@exploits.org>
 
 - fentonups: Now uses fentonups.h file for model definitions

   Also added boost/trim detection for European voltage levels

Sat Sep 11 19:11:29 MDT 1999 / Russell Kroll <rkroll@exploits.org>

 - genericups: Added UPSONIC LAN Saver 600 as type 0, removed upsonic.c

 - genericups: Cleaned up, now gets UPS definitions from genericups.h

Sat Sep 11 18:15:05 MDT 1999 / Russell Kroll <rkroll@exploits.org>

 - upsstats/multimon: Reworked status value parsing to use a table - 
   see clients/status.h.

   Hopefully this will make future translation efforts easier.  The use
   of green/yellow/red for status might need translation too, since assuming
   that "green is good" universally is probably a bad thing...

 - multimon: Added support for these status values:

   Replace battery, overload, voltage trim, voltage boost

 - multimon: TEMPF or TEMPC in the config file will set the default scale
   for UPSTEMP/AMBTEMP and the passthrough to upsstats.

 - upsstats: use_celsius as a CGI argument will now force that mode when
   set to nonzero, and will force degrees F when set to zero.  If it doesn't
   find a value from the arguments provided, it falls back on the compiled
   default.

Sat Sep 11 18:05:41 MDT 1999 / Russell Kroll <rkroll@exploits.org>

 - multimon: The scale for the temperature fields can now be selected in
   the config file, thus overriding the setting (--enable-celsius) in
   configure.

   This should make things a bit simpler for packagers who need to use the
   same binaries in different parts of the world...

Sat Sep 11 15:23:51 MDT 1999 / Russell Kroll <rkroll@exploits.org>

 - fentonups: Fixed battery percentage reporting caused by an off by one
   error.  Spotted by Mark Cooke.

Thu Sep  9 00:06:05 MDT 1999 / Russell Kroll <rkroll@exploits.org>

 - conf/upsmon.conf, docs/shutdown.txt: Oops, it's POWERDOWNFLAG instead of
   POWERDOWNFILE which was listed in a few places.  This one was spotted 
   by Klaus Schallhorn.

0.41.4:

Sun Sep  5 23:05:20 MDT 1999 / Russell Kroll <rkroll@exploits.org>

 - Created CREDITS file.  Don't be shy... send in those patches and get 
   listed.  Source contributors, distribution packagers, port maintainers,
   equipment suppliers, etc.  Consume a few bytes and make yourself known.

 - Applied FreeBSD fixes from Dan Nelson <dnelson@emsphone.com> ...

   This should finally kill the relentless uu_lock demon.  Be happy.

   Also, this patch apparently makes life better for people compiling this 
   code via the ports collection by allowing gd's includes to exist in a
   subdirectory.  

0.41.4-pre6:

Sun Sep  5 18:08:09 MDT 1999 / Russell Kroll <rkroll@exploits.org>

 - fentonups: Using information from the company, the driver has been
   updated to implement the "return from shutdown" command properly.
   Yet another benefit from having a vendor "on board" with this project...
   Thanks again, guys.

 - genericups: Added type #3 - PowerTech Comp1000 UPS support with info
   provided by bart@vianet.net.au.

0.41.4-pre5:

Thu Sep  2 02:06:15 MDT 1999 / Russell Kroll <rkroll@exploits.org>

 - configure.in: changed the tests for -lnsl and -lsocket so they don't
   get used strictly if they exist.  Now you have to have a missing
   connect() function before it will do the tests.  This should keep it
   linking properly on Solaris while skipping it on other systems that
   don't really need it.

   This was noticed on a system running a development version of Slackware
   5.0, so other people with glibc2 may benefit from this as well.

 - upscommon/upsd: cleaned up the message passing code to remove a few
   warnings even though it isn't doing anything right at the moment...

 - upsfetch: cleaned up upsconnect() so you don't have a ton of sockets
   lingering in CLOSE when the TCP connection fails.

Thu Sep  2 01:12:21 MDT 1999 / Russell Kroll <rkroll@exploits.org>

 - fentonups: The UPS doesn't seem to return online after a commanded
   shutdown.  I'm tracking this down with the help of the company, so
   a fix shouldn't be far off.  In the meantime, be aware that using -k
   will probably leave your computer powered off until you can walk over
   to the UPS and manually power cycle it.

Tue Aug 31 20:48:43 MDT 1999 / Russell Kroll <rkroll@exploits.org>

 - docs/: New generic-ups.txt document describing how to use that driver 
   with various types of "contact closure" UPSes like the APC Back-UPS 
   models.

 - smartups/backupspro: Changed shutdown command to "@000" from
   "Z (pause) Z" so the UPS will actually power itself back on when the
   power comes back.  If you have a poweron delay set, expect a really  
   nifty light show on the front panel while the UPS ticks off the time.

 - genericups: Fixed 940-0020B detection flag

Mon Aug 30 13:23:15 MET DST 1999 / Lars Balker Rasmussen <lbr@mjolner.dk>
 
 - models/ & upscommon.h: fixed future conflict with several upsh variables.

0.41.4-pre4:

Sun Aug 29 18:59:29 MDT 1999 / Russell Kroll <rkroll@exploits.org>

 * More discussion on how the shutdowns work ...

   Jozef Hitzinger asked me some pointy questions about how it was going
   to work (namely, upsd tells the model to shutdown) and got me to realize
   that it wasn't the best way to do things.  So, rather than have an 
   inferior shutdown method that is different for all the models, I have
   settled on a common scheme.

   It is now the responsibility of the system's shutdown script to check
   for the flag file (as set in upsmon.conf) and call $MODEL -k /dev/whatever
   if it exists.  The message passing stuff that has been developed during
   the 0.41.x line will not be used for this coordinated shutdown.  It still
   exists in the code, and will be used again later for more interesting 
   things.

   There's a file called shutdown.txt in the docs directory that goes
   into this in more detail.

   I've just finished subjecting my production systems to the coordinated
   shutdown code of this version, and feel it is good enough to be released
   as a prerelease test.  Please give this a workout and see if it holds
   up out there as well.

Sun Aug 29 15:04:04 MDT 1999 / Russell Kroll <rkroll@exploits.org>

 - fentonups: getopt, help/usage, -k for shutdown

Sat Aug 28 19:46:36 MDT 1999 / Russell Kroll <rkroll@exploits.org>

 - models/: backups.c replaced with genericups.c - support for any UPS
   that does basic contact closure on the serial port.  At present it 
   knows about the APC 940-0095A/B/C and 940-0020B cables.  Other models
   using this kind of signaling will be rolled into this module at some
   point.

   If you were using backups before, you must have had a 940-0020B cable,
   so you need to change your scripts to do the following instead:

   genericups -t 2 /dev/whatever 

   Note the -t 2 to indicate the cable/UPS type.

 - smartups/backupspro: Added getopt, help/usage info, -k for shutdown

Tue Aug 24 10:44:37 MDT 1999 / Russell Kroll <rkroll@exploits.org>

 - docs/: updated documentation to reflect current code

Tue Aug 24 09:39:42 MDT 1999 / Russell Kroll <rkroll@exploits.org>

 - upsmon: config file option: POWERDOWNFILE - this file will be created
   when running in master mode to allow tests in the system shutdown
   scripts.  The idea is to test for this file and then call the driver's
   kill mode to force the power down right then.

   This is only really useful for people with models that don't implement
   a delay between the command and actually powering down the load.  One
   example is APC's Back-UPS line.

   See docs/simple-shutdown.txt for more information.

Mon Aug 23 18:09:51 MDT 1999 / Russell Kroll <rkroll@exploits.org>

 - fentonups: added a throwaway query at startup to hopefully fix some
   of the "need to start the driver twice" problems out there...

 - fentonups: added shutdown support

 - upscommon: HAVE_UU_LOCK and HAVE_FLOCK nested so that people with 
   uu_lock (FreeBSD, others?) don't try to call flock() on serial fds.
   A passing of the rubber chicken over this by the FreeBSD users would
   be appreciated.

Mon Aug 23 17:49:07 MDT 1999 / Russell Kroll <rkroll@exploits.org>

 * Clarification on NUMLOGINS:

 - upsd: The command to check the number of logins on a given UPS is
   "REQ NUMLOGINS" - just like checking any other variable.  This one
   happens to be internal, but it works the same way.

   Doing it this way lets programs use the existing getupsvar/getupsvarfd
   function calls and keeps the size of upsfetch/upsd down somewhat.
   So, forget about "NUMLOGINS" below.  It only lasted about an hour in
   the source before common sense caught up with me.

0.41.4-pre3:

Mon Aug 23 17:18:01 MDT 1999 / Russell Kroll <rkroll@exploits.org>

 * Here's the scoop on shutdowns:

   Two drivers support it: backupspro and smartups.  I tried hacking it
   into the backups driver and got a nasty surprise when it powered down
   *IMMEDIATELY* upon having that signal set.  Poor gearbox ... in any 
   event, that driver will not support shutdowns by default in the future.
   If you have one of those things and need reliable shutdowns, toss it.

   upsmon will run in master mode by default.  Specify "slave" on the
   command line to make it bail out immediately when the low battery hits.
   If you have more than one master, things will get very interesting.
   So, don't do it.  The master upsmon is the one running on the host
   that actually is hooked to the UPS.  It has to shutdown LAST, or else
   the slaves lose their upsmon connection too early.

   So, to reiterate:

   - Single system on one UPS: use master mode (upsmon foo master)

   - Multiple systems on one UPS:

      - On the one running upsd: use master mode (upsmon foo master)
  
      - On every other host that cares: slave mode (upsmon foo slave)

   Be sure to edit your upsd.conf!  "login" is only sufficient for 
   slaves.  Master upsmons *must* have "master" access or they will not
   be able to power down the attached load through upsd!

 - smartups/shared.h: added support for dry contact reading from the
   Measure-UPS II board as contributed by Jason L Tibbitts III
   <tibbs@uh.edu> ...

 - New model: upsonic.c - from Jason Thomas <jason@topic.com.au>

Sun Aug 22 18:30:13 MDT 1999 / Russell Kroll <rkroll@exploits.org>

 - New model: optiups.c - by me - tested on an Opti-UPS PowerES 280es model.
   This driver is being a pain on some of my systems, so it's been
   branded EXPERIMENTAL.  It's so tempermental that it isn't even listed
   on the local multimon page yet.  Ugh.

 - upsmon: fixed echo / wall interaction in the final shutdown stages

Sun Aug 22 01:34:03 MDT 1999 / Russell Kroll <rkroll@exploits.org>

 - upsmon: slave mode now starts the shutdown right away and master
   waits around for every other login to clear out.

 - upsd: new protocol command: SHUTDOWNDELAY [<host>] - initiates a
   shutdown after some delay which determined by the UPS and is usually
   set by the user.  This shutdown occurs no matter what the power status 
   happens to be.

   This ensures that attached systems reboot once they shut down, even
   if power returns after they halt and before the UPS can power off.

   This will fail if the UPS support program does not implement this 
   command or message passing.

Wed Aug 18 07:19:23 MDT 1999 / Russell Kroll <rkroll@exploits.org>

 - upsd: new protocol command: NUMLOGINS [<@host>] - show the number
   of clients that have done a LOGIN for a given ups.  upsmon uses this
   number to find out when all the slaves have disconnected.

 - upsd: new protocol command: MASTER [<@host>]- simple test to see if 
   the commands that come with that level of access have been granted 
   to a client.  If this fails, things like the shutdown command (not
   implemented yet) will also fail.

   clients can access this via getprivs() in upscommon.

Tue Aug 17 15:24:25 MDT 1999 / Russell Kroll <rkroll@exploits.org>

 - upsd: fixed an off-by-one in the OK reply when processing "LOGIN"

 - upsmon: adding "slave" or "master" (the default) to the command line
   will set the mode of operation used during shutdowns.

   slave systems shut down immediately at low battery.  master systems will
   hang around for a bit to let all the slaves shut down before initiating
   the ups poweroff.  So far upsmon will only log in as one or the other
   but it still behaves like a slave in all situations.

Tue Aug 17 15:07:47 MDT 1999 / Russell Kroll <rkroll@exploits.org>

 - upscommon/upsd: message sending from upsd to models works

Tue Aug 17 13:45:26 MDT 1999 / Russell Kroll <rkroll@exploits.org>

 - upscommon: ups_handler struct added - functions for parsing msgs
   These should be set _after_ the createmsgq() call...

Mon Aug 16 12:07:42 MDT 1999 / Russell Kroll <rkroll@exploits.org>

 - upsstats: fixed unit error in alt tag for utility

 - fentonups: cleaned up detection for L425 string

0.41.4-pre2:

Thu Aug 12 10:32:38 MDT 1999 / Russell Kroll <rkroll@exploits.org>

 - upsmon: applied poll freq alert patch from Bill Carlson <wcarlson@vh.org>

   This adds "POLLFREQALERT" to the upsmon.conf and breaks things up so
   that you can make upsmon wait longer between queries when everything is
   normal.

 - upscommon: lockport() routine for unified port locking by all modules

 - configure.in: uu_lock test changed (can you tell this is hard to test?)

 - upscommon: uu_lock tweaked some more, uu_unlock called at shutdown

Thu Aug 12 09:10:43 MDT 1999 / Russell Kroll <rkroll@exploits.org>

 - Makefile.in: setver target now makes the %define version without dashes

 - Makefile.in: also sets proper UID/GID for state directory

 - Makefile.in: now makes state directory during install-dirs target

 - upsmon: fixed double login problem when the ups goes stale and comes back

 - smartups: fixed segfault in SU600 hack mode

Tue Aug 10 13:47:09 MDT 1999 / Russell Kroll <rkroll@exploits.org>

 - upsmon: changed the fd situation around so that things like sendmail
   actually work when called from inside the notify script.

0.41.4-pre1:

Fri Aug  6 21:14:50 MDT 1999 / Russell Kroll <rkroll@exploits.org>

 - 0.41.4-pre1 released for Fenton driver testing over the weekend

Fri Aug  6 20:47:24 MDT 1999 / Russell Kroll <rkroll@exploits.org>

 - smartups/backupspro/upscommon: removed APC specific bits from recv
   and added a "endchar" variable so it can now be used by more models
 
   Also recv now supports "ignchars" - things to discard during the
   receive sequence ... handy for tossing async update characters.

Fri Aug  6 20:39:34 MDT 1999 / Russell Kroll <rkroll@exploits.org>

 - upscommon: addinfo no longer changes the info[0] value around.  That
   value should be set to the maximum size of the array and should remain
   constant from that point on.  In the event of unused entries, set their
   types to INFO_UNUSED.

Fri Aug  6 17:29:33 MDT 1999 / Russell Kroll <rkroll@exploits.org>

 - multimon: new field: UTILITY - changes colors based on transfer settings

   Any voltage beyond the low or high transfer points gets a red background
   to bring your attention to the situation.  Models without low and high
   transfer information will always be shown in green.

Fri Aug  6 17:02:16 MDT 1999 / Russell Kroll <rkroll@exploits.org>

 - smartups/backupspro: changed to report the input (line) voltage per
   the protocol in new-modules.txt

Fri Aug  6 16:11:27 MDT 1999 / Russell Kroll <rkroll@exploits.org>

 - upscommon: change to add data in a more generic manner

 - New model support: Fenton Technologies PowerPal/PowerOn/PowerPure units

   Use the "fentonups" driver...

0.41.3:

Wed Aug  4 08:12:47 MDT 1999 / Russell Kroll <rkroll@exploits.org>

 - Released as 0.41.3

0.41.3-pre3:

Mon Aug  2 15:32:55 MDT 1999 / Russell Kroll <rkroll@exploits.org>

 - upscommon/backups: more uu_lock #include tweaks

 - configure.in, models/Makefile.in: tweaks for FreeBSD uu_lock handling

 - backups: zero-length format string warning zapped

Sat Jul 31 21:32:54 MDT 1999 / Russell Kroll <rkroll@exploits.org>

 - multimon/upsstats: should now validate as HTML 4.0 transitional.

0.41.3-pre2:

Sat Jul 31 16:23:22 MDT 1999 / Russell Kroll <rkroll@exploits.org>

 - upsd: fixed nasty access problem where granting any level of access
   would actually grant full access to matching clients

Sat Jul 31 16:03:40 MDT 1999 / Russell Kroll <rkroll@exploits.org>

 - upsd: killed a really ugly memory leak in the REQ handler

 - backups/upscommon: fixed ifdefs: HAVE_UU_LOCK, not HAVE_UULOCK

 - upscommon: moved error reporting on opens around, and added numbers

Tue Jul 27 14:31:46 MDT 1999 / Russell Kroll <rkroll@exploits.org>

 - upslog: applied typo patch from Lars Balker Rasmussen <lbr@mjolner.dk>

0.41.3-pre1:

Mon Jul 26 08:48:33 MDT 1999 / Russell Kroll <rkroll@exploits.org>

 - Makefile.in: setver target added for my own sanity

Sat Jul 24 20:31:43 MDT 1999 / Russell Kroll <rkroll@exploits.org>

 - upscommon/upsd: workaround for systems without struct msgbuf

Sat Jul 24 20:22:37 MDT 1999 / Russell Kroll <rkroll@exploits.org>

 - upsimage.cgi: fixed coredump problem when running from the command line 

Sat Jul 24 17:07:33 MDT 1999 / Russell Kroll <rkroll@exploits.org>

 - upsmon: shutdown() fd when upsd disappears - fixes lingering sockets
   that stay in the CLOSE state forever...

 - upsfetch: sanity checks in getupsvar for variable names

 - smartups/backupspro/backups: message passing support added

 - upsd/upscommon: message passing now implemented.  

   This will be used later to send shutdown commands to models so they
   can power off the UPS.  To test this, connect to a upsd manually
   with nc or telnet and send "TESTSEND".  If your model program supports 
   it and everything is functioning properly, something should show up 
   in your syslog like this:

Jul 24 17:13:12 rkpent smartups[4406]: Received a message from upsd 
Jul 24 17:13:12 rkpent upsd[4409]: Sent test message to model 

   That's all it can do now.  The point of this release will be to make
   sure everything compiles cleanly and nothing else has broken before
   the fun part happens -- parsing all these messages.

   This uses SysV IPC stuff via msgget and friends, so if you don't have
   it, this isn't going to work.  I may add a named pipe interface or
   similar if enough systems don't support this method.

Wed Jul 21 17:45:21 MDT 1999 / Russell Kroll <rkroll@exploits.org>

 - Some Y2K notes are now in the FAQ for the curious...

Sat Jul 17 19:33:06 MDT 1999 / Russell Kroll <rkroll@exploits.org>

 - upsimage: cleaned up some duplicate image generating code

 - upsfetch: now handles bad/invalid password errors properly

 - upscommon: SHM_R/SHM_W fix for NetBSD and other systems that don't
   need such things defined since that's already the default

 - smartups/backups/backupspro: now include master version number for
   tracking bug reports and similar things

 - upsd: -h is now a valid option

 - configure.in: Sanity checking so "--with-uid 1234" forces the default
   value since the proper syntax for such things is "--with-uid=1234" ...

 - configure.in: Added -lz to the test for gdImagePng ... configure won't 
   link the test program without it. 

   For those keeping track, to make PNG images with upsimage.cgi, you must 
   have all of these programs/libraries installed:

  - gd 1.6 or above	http://www.boutell.com/gd/
  - libpng		http://www.cdrom.com/pub/png/pngcode.html
  - zlib		http://www.cdrom.com/pub/infozip/zlib/

 - Added support for PNG mode in gd1.6 and above from 
   Lars Balker Rasmussen <lbr@mjolner.dk>

0.41.2:

Fri Jul 16 10:21:35 MDT 1999 / Russell Kroll <rkroll@exploits.org>

 * For automatic notification of releases (including prereleases), there
   is a new mailing list which only has announcements.  To get on, have a
   chat with majordomo@lists.exploits.org and "subscribe upsdevannounce"...

   This list is restricted posting so you will only get announcements   
   from me.  For questions and other messages, use the normal list.

 - RH6 stuff: Applied patch for spec file and script

 - multimon: Applied patch to handle backslash at end of line condition

0.41.2-pre3:

Fri Jul 16 08:05:36 MDT 1999 / Russell Kroll <rkroll@exploits.org>

 - upsmon: notifycmd call to system() changed somewhat.  This may fix the
   "no args" problems that occasionally surface.

 - conf/multimon.conf: another bad example: loadpct, not upsload

 - Oh yes, back in pre2 a snprintf() bug was fixed in upscommon....

Fri Jul 16 14:23:21 MET DST 1999 / Lars Balker Rasmussen <lbr@mjolner.dk>

 - multimon: Support backslashed quotes in config file.
   Report config file errors to user via cgi.

Thu Jul 15 16:24:09 MDT 1999 / Russell Kroll <rkroll@exploits.org>
 
 - conf/multimon.conf: fixed bad example (upstemp vs. UPSTEMP)

0.41.2-pre2:

Tue Jul 13 15:21:11 MDT 1999 / Russell Kroll <rkroll@exploits.org>

 - Applied RH6 compatibility patch from Bas Vermeulen <bvermeul@blackstar.nl>

0.41.2-pre1:

Tue Jul 13 08:28:00 MDT 1999 / Russell Kroll <rkroll@exploits.org>

 - upsmon: POLLFREQ and ALERTTIME now config file options for tuning.

Tue Jul 13 08:06:01 MDT 1999 / Russell Kroll <rkroll@exploits.org>

 * The Boutell gd page is gone.  Get it while you can just in case the
   Unisys people turn their attention to me next.

   http://www.exploits.org/~rkroll/smartupstools/gd/

   And remember, if anything should happen, the _old_ (before 0.40.0) releases
   of this software have ALL of gd within the tarball!  Just find one of 
   those and rip it out.

 - smartups: #define SU600_HACK to try out experimental Smart-UPS 600
   support which effectively disables polling for a few variables.

Tue Jul 13 07:59:17 MDT 1999 / Russell Kroll <rkroll@exploits.org>

 - docs/FAQ: new file that should help people along...

Sun Jul 11 00:26:05 MDT 1999 / Russell Kroll <rkroll@exploits.org>

 - docs/protocol.txt: updated for upsnames and login/password

Sun Jul 11 00:11:02 MDT 1999 / Russell Kroll <rkroll@exploits.org>

 - docs/access.txt: updated for passwords

 - upsd: Now uses field 4 of the access controls as a password.  If 
   a client matches an access line and it has a password set, they must 
   have that password set or access will be denied.

   This only applies to the 'login' level of security right now.  Other
   (lower) levels do not require a password.  This may be reworked somewhat
   in the near future to be a little more obvious.

 - upsd: PASSWORD - sets a password for a client

 - upsfetch: upslogin now sets the password

Sat Jul 10 22:29:45 MDT 1999 / Russell Kroll <rkroll@exploits.org>

 - docs/access.txt: updated for login level security

 - upsd: enabled login level security (allow logins from clients)

 - upsd: fixed a potential crash when TCP clients disconnected

Sat Jul 10 20:28:36 MDT 1999 / Russell Kroll <rkroll@exploits.org>

 - smartups: Measure-UPS II now prints detection notice at startup

 - upscommon: handler for SIGTERM so detach_shm() gets a chance to run

Sat Jul 10 20:03:28 MDT 1999 / Russell Kroll <rkroll@exploits.org>

 - upsmon: now waits 10 seconds for getupsvarfd with alarm() just in case
   something goes wrong and it blocks...

Sat Jul 10 19:10:47 MDT 1999 / Russell Kroll <rkroll@exploits.org>

 - docs/new-modules.txt: updated for AMBTEMP and AMBHUMID.

 - multimon: config file now available for specifying custom fields

   This means you no longer have to suffer if all of your systems lack
   a certain variable - just exclude it to save on horizontal space.

   Some field names are ALL CAPS and have special meanings and are parsed
   in interesting ways.  Everything else is just a variable name straight 
   from the protocol and is displayed without modification.

   This is optional ... if you don't create a configuration, the old
   layout with the standard fields will be used.

   See conf/multimon.conf for a stock file.

 - upsd: new variables: AMBTEMP and AMBHUMID.

 - smartups: Now supports the Measure-UPS II sensors for external
   temperature and humidity readings.

Sat Jul 10 13:54:58 MDT 1999 / Russell Kroll <rkroll@exploits.org>

 - multimon: now properly close table cells when no data available for a field

 - upsfetch: handle ANS <foo> UNKNOWN properly, but it's an evil hack...

0.41.1:

Fri Jul  9 21:37:06 MDT 1999 / Russell Kroll <rkroll@exploits.org>

 - Prerelease testing ends, promoted to 0.41.1

0.41.1-pre3:

Thu Jul  8 10:09:47 MET DST 1999 / Lars Balker Rasmussen <lbr@mjolner.dk>

 - upsfetch/upsd: replaced bzero()/bcopy() by memset()/memcpy()

Thu Jul  8 08:45:23 MDT 1999 / Russell Kroll <rkroll@exploits.org>

 - clients/Makefile.in: Patched to get the $(NETLIBS) stuff right

0.41.1-pre2:

Wed Jul  7 22:08:45 MDT 1999 / Russell Kroll <rkroll@exploits.org>

 - configure.in: check for -lnsl and -lsocket for Solaris compiles

 - server/Makefile.in, clients/Makefile.in: pass NETLIBS to upsd/upsfetch

Wed Jul  7 10:38:01 MDT 1999 / Russell Kroll <rkroll@exploits.org>

 - server/Makefile.in: removed tab that was confusing Emacs

Tue Jul  6 20:40:05 MET DST 1999 / Lars Balker Rasmussen  <lbr@mjolner.dk>

 - upscommon: create_info() now checks to see if it can write to the state file

 - upscommon: writeinfo() only takes one param now (no initial mode)

 - models/*: all calls to writeinfo(1,...) are gone.

 - upscommon: writeinfo() syslogs errors that were silent before.
       
 - multimon: replaced strsep() by strtok()

 - upsfetch: replace bzero()/bcopy() by memset()/memcpy() for Solaris
   compatibility. 

 - upsstats: renamed getdate() to my_getdate() because of name-clash.

0.41.1-pre1:

Mon Jul  5 14:48:13 MDT 1999 / Russell Kroll <rkroll@exploits.org>

 - upsmon: External notifier.  See NOTIFYCMD in upsmon.conf.

   This is good for when you want to send pages when your power starts
   going crazy and people need to know about it.  Also see pager.txt in
   the docs directory for an example of how to use it.

   The idea for this feature came from Christopher Huffine but I decided
   to implement it differently.  He still deserves the credit though.   

Mon Jul  5 14:14:04 MDT 1999 / Russell Kroll <rkroll@exploits.org>

 - upsmon: Now uses TCP mode for monitoring

   *** This means it can no longer monitor older versions of upsd ***

   If you need to maintain older UDP-only upsd versions, keep an old copy
   of upsmon around!

Mon Jul  5 13:02:07 MDT 1999 / Russell Kroll <rkroll@exploits.org>

 - clients/: New program: upsct - like upsc, but it uses the TCP based 
	     function calls to get the job done.

 - upsfetch: Added new functions for TCP mode

Sun Jul  4 23:50:28 MDT 1999 / Russell Kroll <rkroll@exploits.org>

 - upsd: dropped some scaffolding from the TCP addition

 - upsd: new -t argument to set TCP port... -p sets *both* TCP and UDP
         but -t will override the TCP port only.

   In other words, for UDP on 1234 and TCP on 5678, use -p 1234 -t 5678 ...

Sun Jul  4 03:39:50 MDT 1999 / Russell Kroll <rkroll@exploits.org>

 - upscommon: sprintf() to snprintf()

 - multimon, upsimage, upsstats: sprintf() calls replaced with snprintf()

Sun Jul  4 03:17:33 MDT 1999 / Russell Kroll <rkroll@exploits.org>

 - docs/protocol.txt: updated for LOGOUT and TCP mode

 - upsd: fixed overflow condition in parse (off by one error)

Sun Jul  4 02:24:11 MDT 1999 / Russell Kroll <rkroll@exploits.org>

 - upsd: TCP connections.  Clients need at least "base" access from the
         ACLs or they will be dropped immediately upon connection.

   The protocol semantics are the same as before, with a new LOGOUT command
   to have the server disconnect you.  This obviously doesn't work in UDP 
   mode.

*** File trimmed here 25 June 2000 ***

For entries before this point, refer to a 0.43.2 or earlier tarball.
