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

bugzilla-daemon at bugs.sourcemage.org bugzilla-daemon at bugs.sourcemage.org
Tue Sep 18 01:41:08 EDT 2007


------- 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:

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


. /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 
    # Source everything in /etc/acpi/start.d/
    for SCRIPT in /etc/acpi/start.d/*.sh; do
	if [ -f "$SCRIPT" ] ; then
  	  . $SCRIPT
    echo "Done"
function stop(){
    echo "Disabling power management..."
    if [[ "$(echo /proc/acpi/ac_adapter/*)" != "/proc/acpi/ac_adapter/*" ]]; then
	$PROGRAM stop
    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.

More information about the SM-Grimoire-Bugs mailing list