mirror of
https://github.com/Ponce/slackbuilds
synced 2024-11-16 19:50:19 +01:00
5a41962c79
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
22 lines
498 B
Bash
22 lines
498 B
Bash
#!/bin/bash
|
|
# Copyright (c) 2015 - 2016 DisplayLink (UK) Ltd.
|
|
|
|
suspend_dlm()
|
|
{
|
|
#flush any bytes in pipe
|
|
while read -n 1 -t 1 SUSPEND_RESULT < /tmp/PmMessagesPort_out; do : ; done;
|
|
|
|
#suspend DisplayLinkManager
|
|
echo "S" > /tmp/PmMessagesPort_in
|
|
|
|
if [ -f /tmp/PmMessagesPort_out ]; then
|
|
#wait until suspend of DisplayLinkManager finish
|
|
read -n 1 -t 10 SUSPEND_RESULT < /tmp/PmMessagesPort_out
|
|
fi
|
|
}
|
|
|
|
resume_dlm()
|
|
{
|
|
#resume DisplayLinkManager
|
|
echo "R" > /tmp/PmMessagesPort_in
|
|
}
|