--- ./conf/upssched.conf Mon Jan 27 18:53:26 2003 +++ ../nut-1.2.2/./conf/upssched.conf Sat Jun 28 22:02:45 2003 @@ -14,7 +14,7 @@ # A shell script with a big case..esac construct should work nicely for this. # An example has been provided to help you get started. -CMDSCRIPT /usr/local/ups/bin/upssched-cmd +CMDSCRIPT /usr/freeware/etc/nut/upssched-cmd # ============================================================================ # @@ -41,7 +41,7 @@ # This is commented out by default to make you visit this file and think # about how your system works before potentially opening a hole. # -# PIPEFN /var/run/upssched/upssched.pipe +# PIPEFN /var/freeware/nut/upssched.pipe # ============================================================================ # @@ -56,7 +56,7 @@ # # You should put this in the same directory as PIPEFN. # -# LOCKFN /var/run/upssched/upssched.lock +# LOCKFN /var/freeware/nut/upssched.lock # ============================================================================ # --- ./conf/upsmon.conf Thu Feb 27 14:42:58 2003 +++ ../nut-1.2.2/./conf/upsmon.conf Sat Jun 28 22:02:45 2003 @@ -114,7 +114,7 @@ # # This should work just about everywhere ... if it doesn't, well, change it. -SHUTDOWNCMD "/sbin/shutdown -h +0" +SHUTDOWNCMD "/etc/shutdown -g0 -i0 -p -y" # -------------------------------------------------------------------------- # NOTIFYCMD @@ -132,7 +132,7 @@ # information and ideas, see pager.txt in the docs directory. # # Example: -# NOTIFYCMD /usr/local/ups/bin/notifyme +# NOTIFYCMD /usr/freeware/bin/notifyme # -------------------------------------------------------------------------- # POLLFREQ @@ -202,7 +202,7 @@ # # See the shutdown.txt file in the docs subdirectory for more information. -POWERDOWNFLAG /etc/killpower +POWERDOWNFLAG /usr/freeware/etc/nut/killpower # -------------------------------------------------------------------------- # NOTIFYMSG - change messages sent by upsmon when certain events occur --- ./configure.in Mon Mar 17 10:14:18 2003 +++ ../nut-1.2.2/./configure.in Sat Jun 28 22:02:45 2003 @@ -31,7 +31,7 @@ dnl fails to pass better values in --with arguments GD_INCLUDES="" -GD_LIBS="-L/usr/X11R6/lib -lgd -lpng -lz -ljpeg -lfreetype -lm -lXpm -lX11" +GD_LIBS="-L/usr/freeware/lib32 -lgd -lpng -lz -ljpeg -lfreetype -lXpm -lX11 -lm" dnl Net-SNMP configuration --- ./drivers/sec.c Sun Aug 25 14:18:52 2002 +++ ../nut-1.2.2/./drivers/sec.c Sat Jun 28 22:02:45 2003 @@ -32,7 +32,7 @@ * probing of baud rate in function setup_serial(). * * Move function call nolongertimeout() in sec_upsrecv outside of loop - * so the timeout is reset only when a valid message start character + * so the timeout is reset only when a valid message start character * from the UPS is received. * * Revision 1.5 10 August 2002 Eric Lawson. elawson@inficad.com @@ -50,7 +50,7 @@ * Use actual sec protocol command instead of bogus command when * probing for a ups on the serial port in the setup_serial function. * - * Zero msglen before calling sec_cmd the 2nd time in upsdrv_initinfo + * Zero msglen before calling sec_cmd the 2nd time in upsdrv_initinfo * function. This fixes driver's use of sec protocol parameters * numbered 47 and up. * @@ -590,7 +590,7 @@ { int msg_len; /*supposedly the serial port stuff is already set */ -/*since a serial port was found a moment ago, I won't bother seeing if */ +/*since a serial port was found a moment ago, I won't bother seeing if */ /*the UPS is found here, except for final shutdown command */ /* so cancel any running shutdowns, set auto restart when AC returns, */ --- ./drivers/masterguard.c Tue Oct 8 08:41:27 2002 +++ ../nut-1.2.2/./drivers/masterguard.c Sat Jun 28 22:02:45 2003 @@ -346,7 +346,7 @@ void fakeWH( ) { strcpy( name, "GenericUPS" ); - strcpy( firmware, "unkn" ); + strcpy( firmware, "unkn" ); if( DEBUG ) printf( "Name = %s, Firmware Version = %s\n", name, firmware ); } --- ./drivers/bestuferrups.c Wed Jun 26 00:43:07 2002 +++ ../nut-1.2.2/./drivers/bestuferrups.c Sat Jun 28 22:02:45 2003 @@ -10,7 +10,7 @@ Copyright (C) 2000 John Stone Copyright (C) 2000 Grant Taylor Copyright (C) 1999 Russell Kroll - + This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or @@ -23,7 +23,7 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ @@ -154,7 +154,7 @@ tmp[6] = '\0'; vaout = atoi(tmp); - /* Line status. Bitmask */ + /* Line status. Bitmask */ memcpy(tmp, fstring+72, 2); tmp[2] = '\0'; linestat = atoi(tmp); @@ -174,7 +174,7 @@ tmp[4]= '\0'; acfreq = ((double)(atoi(tmp)) / 100.0); - /* Runtime remaining */ + /* Runtime remaining */ memcpy(tmp, fstring+58, 4); tmp[4]= '\0'; btimeleft = atoi(tmp); @@ -235,7 +235,7 @@ /* Stuff information into info structures */ setinfo(INFO_STATUS, "%s", statstr); - setinfo(INFO_UTILITY, "%05.1f", (double)vin); + setinfo(INFO_UTILITY, "%05.1f", (double)vin); setinfo(INFO_OUTVOLT, "%05.1f", (double)vout); setinfo(INFO_BATTPCT, "%02.1f", battpercent); setinfo(INFO_LOADPCT, "%02.1f", loadpercent); @@ -278,7 +278,7 @@ } /* list flags and values that you want to receive via -x */ -void upsdrv_makevartable(void) +void upsdrv_makevartable(void) { /* allow '-x xyzzy' */ /* addvar(VAR_FLAG, "xyzzy", "Enable xyzzy mode"); */ @@ -385,7 +385,7 @@ if (execute("d 31\r", fcstring, sizeof(fcstring)) > 0) { sscanf(fcstring, "31 HiBatt %f", &fc.fullvolts); } - fc.fullvolts=54.20; + fc.fullvolts=54.20; /* determine "ideal" voltage by a guess */ fc.idealbvolts = ((fc.fullvolts - fc.emptyvolts) * 0.7) + fc.emptyvolts; @@ -399,7 +399,7 @@ { /* every addinfo() consumes an entry. plan ahead, but don't go * overboard, since this is an easy way to waste memory. - */ + */ return 128; } --- ./drivers/mge-utalk.c Thu Oct 3 02:20:02 2002 +++ ../nut-1.2.2/./drivers/mge-utalk.c Sat Jun 28 22:02:45 2003 @@ -719,21 +719,21 @@ usleep(MGE_CHAR_DELAY); } +#if defined(MGE_COMMAND_ENDCHAR) /* send terminating string */ - if (MGE_COMMAND_ENDCHAR) { - for (p = MGE_COMMAND_ENDCHAR; *p; p++) { + for (p = MGE_COMMAND_ENDCHAR; *p; p++) { - if ( isprint(*p) ) - upsdebugx(4, "mge_command: sending [%c]", *p); - else - upsdebugx(4, "mge_command: sending [%02X]", *p); + if ( isprint(*p) ) + upsdebugx(4, "mge_command: sending [%c]", *p); + else + upsdebugx(4, "mge_command: sending [%02X]", *p); - if (write(upsfd, p, 1) != 1) - return -1; - bytes_sent++; - usleep(MGE_CHAR_DELAY); - } + if (write(upsfd, p, 1) != 1) + return -1; + bytes_sent++; + usleep(MGE_CHAR_DELAY); } +#endif if ( !reply ) return bytes_rcvd; --- ./configure Mon Mar 17 10:14:24 2003 +++ ../nut-1.2.2/./configure Sat Jun 28 22:02:45 2003 @@ -1338,7 +1338,7 @@ GD_INCLUDES="" -GD_LIBS="-L/usr/X11R6/lib -lgd -lpng -lz -ljpeg -lfreetype -lm -lXpm -lX11" +GD_LIBS="-L/usr/freeware/lib32 -lgd -lpng -lz -ljpeg -lfreetype -lXpm -lX11 -lm" NSCFLAGS="`net-snmp-config --cflags`"