From: <kr...@us...> - 2006-11-10 19:39:01
|
Revision: 455 http://svn.sourceforge.net/astlinux/?rev=455&view=rev Author: krisk84 Date: 2006-11-10 11:38:53 -0800 (Fri, 10 Nov 2006) Log Message: ----------- apcupsd updates Modified Paths: -------------- trunk/package/apcupsd/apcupsd.mk trunk/target/device/net4801/linux.config trunk/target/device/wrap/linux.config Added Paths: ----------- trunk/package/apcupsd/apccontrol Added: trunk/package/apcupsd/apccontrol =================================================================== --- trunk/package/apcupsd/apccontrol (rev 0) +++ trunk/package/apcupsd/apccontrol 2006-11-10 19:38:53 UTC (rev 455) @@ -0,0 +1,154 @@ +#!/bin/sh +# +# Copyright (C) 1999-2002 Riccardo Facchetti <ric...@ma...> +# +# for apcupsd release 3.12.4 (19 August 2006) - redhat +# +# platforms/apccontrol. Generated from apccontrol.in by configure. +# +# Note, this is a generic file that can be used by most +# systems. If a particular system needs to have something +# special, start with this file, and put a copy in the +# platform subdirectory. +# + +# +# These variables are needed for set up the autoconf other variables. +# +prefix=/home/kris/projects/astlinux-trunk/build_i586/staging_dir +exec_prefix=/usr + +APCPID=/var/run/apcupsd.pid +APCUPSD=/sbin/apcupsd +SHUTDOWN=/sbin/shutdown +SCRIPTSHELL=/bin/sh +SCRIPTDIR=/etc +WALL=wall + +# +# Concatenate all output from this script to the events file +# Note, the following kills the script in a power fail situation +# where the disks are mounted read-only. +# exec >>/var/log/apcupsd.events 2>&1 + +# +# This piece is to substitute the default behaviour with your own script, +# perl, or C program. +# You can customize every single command creating an executable file (may be a +# script or a compiled program) and calling it the same as the $1 parameter +# passed by apcupsd to this script. +# +# After executing your script, apccontrol continues with the default action. +# If you do not want apccontrol to continue, exit your script with exit +# code 99. E.g. "exit 99". +# +# WARNING: the apccontrol file will be overwritten every time you update your +# apcupsd, doing `make install'. Your own customized scripts will _not_ be +# overwritten. If you wish to make changes to this file (discouraged), you +# should change apccontrol.sh.in and then rerun the configure process. +# +if [ -f ${SCRIPTDIR}/${1} -a -x ${SCRIPTDIR}/${1} ] +then + ${SCRIPTDIR}/${1} ${2} ${3} ${4} + # exit code 99 means he does not want us to do default action + if [ $? = 99 ] ; then + exit 0 + fi +fi + +case "$1" in + killpower) + echo "Apccontrol doing: ${APCUPSD} --killpower on UPS ${2}" + sleep 10 + ${APCUPSD} --killpower + echo "Apccontrol has done: ${APCUPSD} --killpower on UPS ${2}" | ${WALL} + ;; + commfailure) + echo "Warning communications lost with UPS ${2}" | ${WALL} + ;; + commok) + echo "Communications restored with UPS ${2}" | ${WALL} + ;; +# +# powerout, onbattery, offbattery, mainsback events occur +# in that order. +# + powerout) + echo "Warning power loss detected on UPS ${2}" | ${WALL} + ;; + onbattery) + echo "Power failure on UPS ${2}. Running on batteries." | ${WALL} + ;; + offbattery) + ;; + mainsback) + echo "Power has returned on UPS ${2}..." | ${WALL} + if [ -f /etc/powerfail ] ; then + printf "Continuing with shutdown." | ${WALL} + fi + ;; + failing) + echo "Battery power exhaused on UPS ${2}. Doing shutdown." | ${WALL} + ;; + timeout) + echo "Battery time limit exceeded on UPS ${2}. Doing shutdown." | ${WALL} + ;; + loadlimit) + echo "Remaining battery charge below limit on UPS ${2}. Doing shutdown." | ${WALL} + ;; + runlimit) + echo "Remaining battery runtime below limit on UPS ${2}. Doing shutdown." | ${WALL} + ;; + doreboot) + echo "UPS ${2} initiating Reboot Sequence" | ${WALL} + ${SHUTDOWN} -r now "apcupsd UPS ${2} initiated reboot" + ;; + doshutdown) + echo "UPS ${2} initiated Shutdown Sequence" | ${WALL} + ${SHUTDOWN} -h now "apcupsd UPS ${2} initiated shutdown" + ;; + annoyme) + echo "Power problems with UPS ${2}. Please logoff." | ${WALL} + ;; + emergency) + echo "Emergency Shutdown. Possible battery failure on UPS ${2}." | ${WALL} + ${SHUTDOWN} -h now "apcupsd emergency shutdown" + ;; + changeme) + echo "Emergency! Batteries have failed on UPS ${2}. Change them NOW" | ${WALL} + ;; + remotedown) + echo "Remote Shutdown. Beginning Shutdown Sequence." | ${WALL} + ${SHUTDOWN} -h now "apcupsd remote shutdown" + ;; + restartme) + echo -n "Restarting APCUPSD Power Management: " + THEPID=`cat ${APCPID}` + kill ${THEPID} + rm -f ${APCPID} + rm -f /etc/powerfail + rm -f /etc/nologin + sleep 5 + `${APCUPSD}` + echo "apcupsd" + ;; + startselftest) + ;; + endselftest) + ;; + mastertimeout) + echo "Warning connection from master lost." | ${WALL} + ;; + masterconnect) + echo "Connection from master established." | ${WALL} + ;; + battdetach) + ;; + battattach) + ;; + *) echo "Usage: ${0##*/} command" + echo " warning: this script is intended to be launched by" + echo " apcupsd and should never be launched by users." + exit 1 + ;; +esac Modified: trunk/package/apcupsd/apcupsd.mk =================================================================== --- trunk/package/apcupsd/apcupsd.mk 2006-11-08 19:45:19 UTC (rev 454) +++ trunk/package/apcupsd/apcupsd.mk 2006-11-10 19:38:53 UTC (rev 455) @@ -39,7 +39,7 @@ touch $(APCUPSD_DIR)/.configured; $(APCUPSD_DIR)/$(APCUPSD_BINARY): $(APCUPSD_DIR)/.configured - $(MAKE) CC=$(TARGET_CC) -C $(APCUPSD_DIR) + $(MAKE1) CC=$(TARGET_CC) -C $(APCUPSD_DIR) $(TARGET_DIR)/$(APCUPSD_TARGET_BINARY): $(APCUPSD_DIR)/$(APCUPSD_BINARY) # $(MAKE) prefix=$(TARGET_DIR)/usr -C $(APCUPSD_DIR) install Modified: trunk/target/device/net4801/linux.config =================================================================== --- trunk/target/device/net4801/linux.config 2006-11-08 19:45:19 UTC (rev 454) +++ trunk/target/device/net4801/linux.config 2006-11-10 19:38:53 UTC (rev 455) @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit # Linux kernel version: 2.6.18 -# Thu Nov 2 23:10:08 2006 +# Fri Nov 10 14:36:31 2006 # CONFIG_X86_32=y CONFIG_GENERIC_TIME=y @@ -1387,13 +1387,11 @@ # # USB Input Devices # -# CONFIG_USB_HID is not set - -# -# USB HID Boot Protocol drivers -# -# CONFIG_USB_KBD is not set -# CONFIG_USB_MOUSE is not set +CONFIG_USB_HID=y +CONFIG_USB_HIDINPUT=y +# CONFIG_USB_HIDINPUT_POWERBOOK is not set +# CONFIG_HID_FF is not set +CONFIG_USB_HIDDEV=y # CONFIG_USB_AIPTEK is not set # CONFIG_USB_WACOM is not set # CONFIG_USB_ACECAD is not set Modified: trunk/target/device/wrap/linux.config =================================================================== --- trunk/target/device/wrap/linux.config 2006-11-08 19:45:19 UTC (rev 454) +++ trunk/target/device/wrap/linux.config 2006-11-10 19:38:53 UTC (rev 455) @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit # Linux kernel version: 2.6.18 -# Fri Nov 3 12:29:03 2006 +# Fri Nov 10 14:36:31 2006 # CONFIG_X86_32=y CONFIG_GENERIC_TIME=y @@ -1387,13 +1387,11 @@ # # USB Input Devices # -# CONFIG_USB_HID is not set - -# -# USB HID Boot Protocol drivers -# -# CONFIG_USB_KBD is not set -# CONFIG_USB_MOUSE is not set +CONFIG_USB_HID=y +CONFIG_USB_HIDINPUT=y +# CONFIG_USB_HIDINPUT_POWERBOOK is not set +# CONFIG_HID_FF is not set +CONFIG_USB_HIDDEV=y # CONFIG_USB_AIPTEK is not set # CONFIG_USB_WACOM is not set # CONFIG_USB_ACECAD is not set @@ -1487,7 +1485,6 @@ # # LED drivers # -CONFIG_LEDS_NET48XX=m CONFIG_LEDS_WRAP=m # This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |