diff -urN apmd-3.2.2.orig.orig/Makefile apmd-3.2.2.orig/Makefile --- apmd-3.2.2.orig.orig/Makefile 2006-02-12 02:21:34.000000000 -0600 +++ apmd-3.2.2.orig/Makefile 2006-02-12 02:22:15.000000000 -0600 @@ -107,7 +107,6 @@ $(LT_INSTALL) apmd $(DESTDIR)$(SBINDIR) $(LT_INSTALL) xapm $(DESTDIR)$(BINDIR) $(LT_INSTALL) apmsleep $(DESTDIR)$(BINDIR) - install on_ac_power $(DESTDIR)$(BINDIR) install -m 644 apm.h $(DESTDIR)$(INCDIR) .PHONY: clean distclean diff -urN apmd-3.2.2.orig.orig/on_ac_power apmd-3.2.2.orig/on_ac_power --- apmd-3.2.2.orig.orig/on_ac_power 2006-02-12 02:21:34.000000000 -0600 +++ apmd-3.2.2.orig/on_ac_power 1969-12-31 18:00:00.000000000 -0600 @@ -1,62 +0,0 @@ -#!/bin/sh -# -# Returns 0 (true) if on AC power -# 1 (false) if not on AC power -# 255 (false) if can't tell -# -# Example shell script: -# if on_ac_power; then -# echo We're on AC power -# else -# echo Can't say we're on AC power -# fi - -set -e - -# ACPI -# -# This algorithm is complicated by the possibility of multiple AC -# adapters. We scan the ac_adapter directory looking for adapters -# that have known states. If any adapter is on-line, we return 0. If -# no adapters are on-line but one or more are off-line, we return 1. -# -if acpi_available && [ -d /proc/acpi/ac_adapter ]; then - OFF_LINE_P=no - for FN in /proc/acpi/ac_adapter/*; do - if [ -d "${FN}" ]; then - if [ -r "${FN}/state" ]; then - grep --quiet on-line "${FN}/state" && exit 0 - grep --quiet off-line "${FN}/state" && OFF_LINE_P=yes - elif [ -r "${FN}/status" ]; then - grep --quiet on-line "${FN}/status" && exit 0 - grep --quiet off-line "${FN}/status" && OFF_LINE_P=yes - fi - fi - done - [ "${OFF_LINE_P}" = "yes" ] && exit 1 -fi - -# APM -if apm_available && [ -r /proc/apm ]; then - exec awk insert n+1 empty lines -.\" for manpage-specific macros, see man(7) -.SH NAME -on_ac_power \- test whether the computer is running on line power -.SH SYNOPSIS -.B on_ac_power -.SH DESCRIPTION -The command succeeds (status 0) if the system is using line power -and fails (status other than 0) otherwise. -It is designed to be easy to use in shell scripts. -.SH OPTIONS -None. -.SH "EXIT STATUS" -.br -.nf -\fB0\fR (true) System is on line power -\fB1\fR (false) System is not on line power -\fB255\fR (false) Power status could not be determined -.SH FILES -.br -.nf -.ta \w'/proc/apm 'u -\fI/proc/apm\fR APM status information file -.nf -.ta \w'/proc/acpi/ 'u -\fI/proc/acpi\fR ACPI status information directory -.SH AUTHOR -This manual page was written by Steve Dodd -and was updated by Thomas Hood.