summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rwxr-xr-xsrc/on_ac_power23
2 files changed, 26 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 33cb699..970f9f0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2006-05-02 Peter Jones <pjones@redhat.com>
+
+ * pm-action: add copyright and license notice.
+
2006-05-01 Peter Jones <pjones@redhat.com>
* Makefile: add "make test-archive"
diff --git a/src/on_ac_power b/src/on_ac_power
index 9fea0ca..7c0b02a 100755
--- a/src/on_ac_power
+++ b/src/on_ac_power
@@ -1,11 +1,32 @@
#!/bin/bash
-
+#
# Test if the computer is running on line power
# Exit status:
# - 0 (true) System is on AC power
# - 1 (false) System is not on AC power
#
# NOTE: Absence of batteries is taken to mean that the system is on ac power.
+#
+# Copyright 2006 Red Hat, Inc.
+# Copyright 2006 Richard Hughes
+#
+# Based on work from:
+# Richard Hughes <hughsient@gmail.com>
+# Peter Jones <pjones@redhat.com>
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of version 2 of the GNU General Public License as
+# published by the Free Software Foundation.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# 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
+#
# Check for AC/DC/etc adapters
for device in $(hal-find-by-capability --capability ac_adapter) ; do