Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #####################
- #!/bin/bash -x
- # File: "/etc/pm/sleep.d/99_cyapa".
- case "${1}" in
- hibernate)
- /sbin/rmmod cyapa
- ;;
- resume|thaw)
- COUNTER=0
- while [ $COUNTER -lt 10 ]; do
- date >>/tmp/99_cyapa
- /sbin/modprobe cyapa
- sleep 1
- dmesg | grep cyapa | tail -1 | grep error >/dev/null
- RES=$?
- echo "res=$RES"
- if [ ${RES} -ne 1 ] ; then
- /sbin/rmmod cyapa
- sleep 1
- else
- #done
- COUNTER=11
- fi
- COUNTER=`expr $COUNTER + 1`
- done
- ;;
- esac
- exit 0
- #################
Advertisement
Add Comment
Please, Sign In to add comment