Using bash sript that accept these arguments:

Here is an example of mine!

root@pcxthinkslack:/home/bowo# cat /etc/pm/sleep.d/pcx.sh
#!/bin/bash
case $1 in
        suspend|freeze)
                #suspending to RAM
                logger "suspend/freeze in action"
                ;;
        resume|thaw)
                #resume from suspend
                #set default parameter of mic led that is muted
                logger "resume/thaw in action"
                sudo chmod o+w /sys/devices/platform/thinkpad_acpi/leds/tpacpi::micmute/brightness
                echo 1 >  /sys/devices/platform/thinkpad_acpi/leds/tpacpi::micmute/brightness
                sudo chmod o-w /sys/devices/platform/thinkpad_acpi/leds/tpacpi::micmute/brightness
                #restore mixer settings
                alsactl restore
                ;;
        *)
                ;;
esac

=-=-=-=-=
Powered by Blogilo