rpms/pm-utils/devel pm-utils-0.99.4-readme_update.patch, NONE, 1.1 pm-utils.spec, 1.88, 1.89
Till Maas (till)
fedora-extras-commits at redhat.com
Wed Jan 9 02:46:36 UTC 2008
Author: till
Update of /cvs/pkgs/rpms/pm-utils/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv25195
Modified Files:
pm-utils.spec
Added Files:
pm-utils-0.99.4-readme_update.patch
Log Message:
* Wed Jan 09 2008 Till Maas <opensource till name> - 0.99.4-13
- update README to describe the current beheaviour of pm-utils
pm-utils-0.99.4-readme_update.patch:
--- NEW FILE pm-utils-0.99.4-readme_update.patch ---
diff -up pm-utils-0.99.4/README.readme_update pm-utils-0.99.4/README
--- pm-utils-0.99.4/README.readme_update 2006-10-30 19:16:48.000000000 +0100
+++ pm-utils-0.99.4/README 2008-01-09 03:41:48.000000000 +0100
@@ -24,30 +24,108 @@ file into the hooks directory, for examp
- setting grub to be the default target for a hibernate-resume
- other wacky things that need doing on specific systems
-How do "hooks" work?
+How does pm-utils work?
-* You put a file in /etc/pm/hooks, which is executable. When suspend or
+Pm-utils contains the following executables:
+
+* on_ac_power - checks whether the system is on ac power
+ (see man 1 on_ac_power)
+* pm-is-supported - checks whether the system is capables of suspend or resume
+ (see man 1 pm-is-supported)
+* pm-powersave - This runs the power.d hooks, it takes true or false as first
+ argument, depending on whether power should be saved
+* pm-suspend - This runs the sleep.d hooks with suspend as first argument
+ (this is usually run by another tool, e.g. gnome-power-manager)
+ and finally suspends the machine (suspend to ram)
+* pm-hibernate - Thus runs the sleep.d hooks with hibernate as first argument
+ (this is usually run by another tool, e.g. gnome-power-manager)
+ and finally hibernates the machine (suspend to disk)
+* pm-suspend-hybrid - not yet implemented
+
+
+Pm-utils has the following directory structure in /usr/lib,
+the contens of the power.d and sleep.d may vary.
+
+/usr/lib/pm-utils/
+|-- bin
+| |-- pm-action
+| |-- pm-pmu
+| `-- pm-reset-swap
+|-- defaults
+|-- functions
+|-- power.d
+| `-- sched-powersave
+`-- sleep.d
+ |-- 00clear
+ |-- 01grub
+ |-- 05led
+ |-- 10NetworkManager
+ |-- 20video
+ |-- 49bluetooth
+ |-- 50modules
+ |-- 55battery
+ |-- 60sysfont
+ |-- 65alsa
+ |-- 90clock
+ |-- 94cpufreq
+ |-- 95led
+ |-- 99hd-apm-restore.hook
+ `-- 99video
+
+Within the power.d and sleep.d directories, the default hooks are stored.
+Adjustments can be done within /etc/pm:
+
+/etc/pm
+|-- config.d
+| |-- 02oldconfig.conf
+| `-- hd-apm-restore.conf
+|-- power.d
+`-- sleep.d
+ `-- 95ac-power-indicator.hook
+
+The config.d directory may contain bash scripts, that are sourced by
+pm-suspend and pm-hibernate to change the beheaviour of pm-utils.
+The power.d and sleep.d directories can be used to add your own hooks
+to pm-utils or to overwrite the default hooks. To overwrite an hook simply
+add a hook with the same name to the directory.
+
+
+How do hooks work?
+
+* You put a file in /etc/pm/sleep.d, which is executable. When suspend or
hibernate is called, several things happen:
1) a new virtual terminal is alloced and switched to
- 2) /etc/pm/config is evaluated . This config file that should only be
- modified by end-users.
- 3) /etc/pm/config.d/* are evaluated in C sort order. These files can be
- provided by individual packages outside of pm-utils. If a global config
- variable is set, the value set to will be appended to the previous value.
- If any other variable is set, it will be ignored.
- 4) each of /etc/pm/hooks/* are executed in C sort order. The first command
+ 2) /etc/pm/config.d/* are sourced in bash filename expansion sort order.
+ These files can be provided by individual packages outside of pm-utils or
+ provided by the user.
+ To append to a global variable, please use BAR+=" foo", to append
+ the value foo separated with a space to the variable BAR
+ 3) each of /etc/pm/sleep.d/* are executed in C sort order. The first command
line argument is "suspend" or "hibernate". These files may source
configuration files from /etc/pm/config.d/ on their own in order to pick
- up variables set there that aren't part of the global list. Note that
+ up variables set there that aren't part of the global list. Note that
hooks should take care to preserve any global configuration variable
which _that_ hook will later need to use, as sourcing this config file
will clobber any such variables.
- 5) the system suspends or hibernates.
- 6) some event happens to wake the machine up
- 7) each of /etc/pm/hooks/* are executed in reverse C sort order. The first
+ 4) the system suspends or hibernates.
+ 5) some event happens to wake the machine up
+ 6) each of /etc/pm/sleep.d/* are executed in reverse C sort order. The first
command line argument is "resume" or "thaw".
- 8) the system switches back to the original virtual terminal from step 1.
+ 7) the system switches back to the original virtual terminal from step 1.
That's it!
+Which variables can be used to configure pm-utils?
+
+SUSPEND_MODULES
+ This is a space separted list of modules, that should be removed before sleep and
+ reloaded afterwards.
+
+HIBERNATE_MODE
+ This can be used to change the mode for hibernate. Default is platform. In case you
+ need to change it to shutdown, please file a bug report, because this usually is a
+ bug. Other valid modes are listed with
+ cat /sys/power/disk
+ You can find more info about them in the kernel documentation in
+ Documentation/power/*
Index: pm-utils.spec
===================================================================
RCS file: /cvs/pkgs/rpms/pm-utils/devel/pm-utils.spec,v
retrieving revision 1.88
retrieving revision 1.89
diff -u -r1.88 -r1.89
--- pm-utils.spec 8 Jan 2008 22:09:22 -0000 1.88
+++ pm-utils.spec 9 Jan 2008 02:45:57 -0000 1.89
@@ -2,7 +2,7 @@
Summary: Power management utilities and scripts for Fedora
License: GPLv2
Version: 0.99.4
-Release: 12%{?dist}
+Release: 13%{?dist}
Group: System Environment/Base
URL: http://pm-utils.freedesktop.org
Requires: usermode kbd pciutils >= 2.2.1
@@ -40,6 +40,7 @@
Patch5: pm-utils-missing-uniq.patch
Patch6: pm-utils-nullglob.patch
Patch7: pm-utils-0.99.4-hibernate_mode.patch
+Patch8: pm-utils-0.99.4-readme_update.patch
%description
@@ -57,6 +58,7 @@
%patch5 -p0 -b .missing-uniq
%patch6 -p0 -b .nullglob
%patch7 -p1 -b .hibernate_mode
+%patch8 -p1 -b .readme_update
%build
@@ -148,6 +150,9 @@
%ghost %verify(not md5 size mtime) %{_localstatedir}/log/pm-suspend.log
%changelog
+* Wed Jan 09 2008 Till Maas <opensource till name> - 0.99.4-13
+- update README to describe the current beheaviour of pm-utils
+
* Tue Jan 08 2008 Till Maas <opensource till name> - 0.99.4-12
- remove ExclusiveArch, because it contains all supported archs
(in case an arch schould be excluded, please use ExcludeArch)
More information about the fedora-extras-commits
mailing list