How to wait that the machine resume in a script
Hello,
I just test acpi and it appears to have behave properly. I would like to
know via a script that the machine has been resumed. Something like
echo -n disk /sys/power/state
waitresumed
continue with the script
The naive solution to wait until "echo -n disk /sys/power/state" returns do not work because it returns too quicly.
Olive
-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc. Get Certified Today Register for a JBoss Training Course. Free Certification Exam for All Training Attendees Through End of 2005. For more info visit:
http://ads.osdn.com/?ad_id=7628&alloc_id=16845&op=click
Hello,
Quoted 6 lines
echo -n disk
/sys/power/state
waitresumed
continue with the scriptThe naive solution to wait until "echo -n disk
/sys/power/state" returns do not work because it returns too quicly.
Do you mean "echo -n disk > /sys/power/state"? This works correctly for me with suspend to ram ("echo mem > /sys/power/state").
How much too fast does it return? What about using a sleep 1 after the echo call?
-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc. Get Certified Today Register for a JBoss Training Course. Free Certification Exam for All Training Attendees Through End of 2005. For more info visit:
http://ads.osdn.com/?ad_id=7628&alloc_id=16845&op=click
Quoted 11 lines · Olive
Hello,
I just test acpi and it appears to have behave properly. I would like to
know via a script that the machine has been resumed. Something likeecho -n disk
/sys/power/state
waitresumed
continue with the scriptThe naive solution to wait until "echo -n disk
/sys/power/state" returns do not work because it returns too quicly.
Really? It should not... it can not. When machine is suspended, script can't run...
Pavel
Signature · 8 lines
Thanks, Sharp! ------------------------------------------------------- This SF.Net email is sponsored by the JBoss Inc. Get Certified Today Register for a JBoss Training Course. Free Certification Exam for All Training Attendees Through End of 2005. For more info visit: http://ads.osdn.com/?ad_id=7628&alloc_id=16845&op=click