> use lilo?
grub
> xorg versione?
> dist?
ubuntu edgy
> sky2 module remove before suspend?
> what are command to suspend? echo -n "mem" > /sys/power/state or s2ram -f -XXX
gentoo-pwermanager

/usr/sbin/laptop-detect was chaged to return 0

[EMAIL PROTECTED]:/usr/src/kvm# cat /usr/sbin/laptop-detect
#!/bin/sh -e

exit 0

# Are we a mac?
if test -d /proc/pmu; then
        batteries=$(grep Battery /proc/pmu/info| cut -f2 -d:)
        if test "$batteries" -ne 0; then
#                echo "We're a laptop" &>2;
                exit 0
        fi
        exit 1
fi

if [ -r /dev/mem -a -x /usr/sbin/dmidecode ]; then
        # dmidecode to grab the Chassis type
        dmitype=$(dmidecode|grep Chassis -A 10|grep -m1 Type|sed -e 's/.*Type: 
\(.*\)/\1/')

        if test "$dmitype" = "Notebook" || test "$dmitype" = "Portable"; then
#               echo "We're a laptop" >&2;
                exit 0;
        fi

        # turn back on for debugging
        #echo "$dmitype"
fi

# check for any ACPI batteries
if [ -d /proc/acpi/battery ]; then
        results=`find /proc/acpi/battery/ -mindepth 1 -type d`
        if [ ! -z "$results" ]; then
        #we're almost certainly a laptop
#                echo "We're a laptop" >&2;
                exit 0
        fi
fi

# check for APM batteries. This sucks, because we'll only get a valid response
# if the laptop has a battery fitted at the time
if [ -f /proc/apm ]; then
    battery=`awk '{print $6}' </proc/apm`
    if [ "$battery" != "0xff" ] && [ "$battery" != "0x80" ]; then
        # There's a battery
        exit 0;
    fi
fi

#probably not a laptop; exit 
exit 1



cu

Edgar (gimli) Hucek

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Mactel-linux-devel mailing list
Mactel-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mactel-linux-devel

Reply via email to