Ubuntu

Comment 33 for bug 77370

vasek125 (vasek) wrote :

This is new code:

#!/bin/sh
#
# 99funguj: sprav co se da

case "$1" in
 hibernate|suspend)
  # Stopping is not required.
  ;;
 thaw|resume)
  # sprav to
  for x in /proc/acpi/fan/*; do
      if [ -f "$x/state" ] && [ "`grep on $x/state`" ]; then
          echo -n 3 > $x/state;
          echo -n 0 > $x/state;
      fi
  done
                for x in /proc/acpi/fan/*; do
                    if [ -f "$x/state" ] && [ "`grep off $x/state`" ]; then
                        echo "echo -n 0 > $x/state;" >> /tmp/fanstate0
                        echo "echo -n 3 > $x/state;" >> /tmp/fanstate3
                    fi
                done
  sh /tmp/fanstate0
  sleep 1
  sh /tmp/fanstate3

  rm /tmp/fanstate0
  rm /tmp/fanstate3
  ;;
 *) exit $NA
  ;;
esac