Skip to Content.
Sympa Menu

sm-grimoire-bugs - [SM-Grimoire-Bugs] [Bug 13998] acpi-support spell from debian package

sm-grimoire-bugs AT lists.ibiblio.org

Subject: SourceMage Grimoire Bug List

List archive

Chronological Thread  
  • From: bugzilla-daemon AT bugs.sourcemage.org
  • To: sm-grimoire-bugs AT lists.ibiblio.org
  • Subject: [SM-Grimoire-Bugs] [Bug 13998] acpi-support spell from debian package
  • Date: 18 Sep 2007 05:41:08 -0000

http://bugs.sourcemage.org/show_bug.cgi?id=13998





------- Additional Comments From ruskie+smbugs AT mages.ath.cx 2007-09-18 00:41
-------
Erm... the init scripts aren't proper... The original ones that you link to
can easily be modified to work with our system... Here's an example:

---
#!/bin/sh
# INIT script to check whether we're on batteries, and so start with laptop
# mode etc enabled.

PROGRAM=/etc/acpi/power.sh
RUNLEVEL=3

. /etc/init.d/smgl_init

test -f /usr/share/acpi-support/power-funcs || exit 0

# BUGS: unless we start *really* late, we have no way of throttling
# xscreensaver, since it won't be there to command.
. /usr/share/acpi-support/power-funcs

test -d /var/lib/acpi-support || exit 0

function start(){
echo "Checking battery state..."
if [[ "$(echo /proc/acpi/ac_adapter/*)" != "/proc/acpi/ac_adapter/*" ]];
then
$PROGRAM
fi
# Source everything in /etc/acpi/start.d/
for SCRIPT in /etc/acpi/start.d/*.sh; do
if [ -f "$SCRIPT" ] ; then
. $SCRIPT
fi
done
echo "Done"
}
function stop(){
echo "Disabling power management..."
if [[ "$(echo /proc/acpi/ac_adapter/*)" != "/proc/acpi/ac_adapter/*" ]];
then
$PROGRAM stop
fi
echo "Done"
}
function restart(){
echo "Unsupported"
}
function force-reload(){
echo "Unsupported"
}

--
Configure bugmail: http://bugs.sourcemage.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.




Archive powered by MHonArc 2.6.24.

Top of Page