Login
Log in using an SSO provider:
Fedora Account System
Red Hat Associate
Red Hat Customer
Login using a Red Hat Bugzilla account
Forgot Password
Create an Account
Red Hat Bugzilla – Attachment 92733 Details for
Bug 98521
make apm-script ACPI aware
Home
New
Search
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh92 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
[?]
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
patch to make /etc/sysconfig/apm-scripts/apmscript ACPI aware
apmscript.diff (text/plain), 2.02 KB, created by
Ronny Bremer
on 2003-07-03 09:01:27 UTC
(
hide
)
Description:
patch to make /etc/sysconfig/apm-scripts/apmscript ACPI aware
Filename:
MIME Type:
Creator:
Ronny Bremer
Created:
2003-07-03 09:01:27 UTC
Size:
2.02 KB
patch
obsolete
>--- apmscript.org 2003-07-03 10:02:41.000000000 +0200 >+++ apmscript 2003-07-03 10:34:06.000000000 +0200 >@@ -41,6 +41,15 @@ > CLOCK="--localtime" > [ "$UTC" = "yes" -o "$UTC" = "true" -o "$UTC" = 1 ] && CLOCK="--utc" > >+# evaluate the state of power connected via APM or ACPI >+# 2003-07-03 Ronny Bremer <rbremer@future-gate.com> >+AC_ONLINE=0 >+if [ -f /proc/apm ] && apm | LC_ALL=C grep -q on-line &>/dev/null; then >+ AC_ONLINE=1 >+elif [ -f /proc/acpi/ac_adapter/AC/state ] && LC_ALL=C grep -q "^state: *on-line$" /proc/acpi/ac_adapter/AC/state &>/dev/null; then >+ AC_ONLINE=1 >+fi >+ > case "$PROG" in > suspend|standby) > [ -f /etc/sysconfig/apm-scripts/apmcontinue-pre ] && /etc/sysconfig/apm-scripts/apmcontinue-pre "$@" >@@ -279,7 +288,7 @@ > # If anacron is installed and we're on AC power or we want > # to run it even in battery mode. > if [ -x /usr/sbin/anacron ]; then >- if apm | LC_ALL=C grep -q on-line &>/dev/null; then >+ if [ "x$AC_ONLINE" = "x1" ]; then > /usr/sbin/anacron -s > elif test "x$ANACRON_ON_BATTERY" = "xyes"; then > /usr/sbin/anacron -s >@@ -287,7 +296,7 @@ > fi > > if test "x$CPUFREQ" = "xyes"; then >- if apm | LC_ALL=C grep -q on-line &>/dev/null; then >+ if [ "x$AC_ONLINE" = "x1" ]; then > echo -n "0%100%100%performance" > /proc/cpufreq > else > echo -n "0%0%0%powersave" > /proc/cpufreq >@@ -312,7 +321,7 @@ > # change from performance to powersave or vice versa based > # on whether we're running on battery or ac power > if test "x$CPUFREQ" = "xyes"; then >- if apm | LC_ALL=C grep -q on-line &>/dev/null; then >+ if [ "x$AC_ONLINE" = "x1" ]; then > echo -n "0%100%100%performance" > /proc/cpufreq > else > echo -n "0%0%0%powersave" > /proc/cpufreq >@@ -320,7 +329,7 @@ > fi > > # Change from battery power to AC power or vice versa. >- if apm | LC_ALL=C grep -q on-line &>/dev/null; then >+ if [ "x$AC_ONLINE" = "x1" ]; then > [ -f /proc/sys/vm/laptop_mode ] && echo 0 > /proc/sys/vm/laptop_mode > what="start" > if [ -n "$LOWPOWER_SERVICES" -a -e /var/run/apmd/LOW_POWER ]; then
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 98521
: 92733