Creating PKGBUILD for displaylink-runit
This is a follow up to this post. I got some initial reviews/screening from the Artix Telegram, reddit, and aur-general email list communities.
Before I publish this, I would like review from runit experts
https://github.com/e-dong/aur-displaylink-runit/pull/1
One of my specific questions was if there is a runit equivalent to the sleep script. The original PKGBUILD references this:
"$pkgdir/usr/lib/systemd/system-sleep/displaylink.sh"
The sleep script contains this content:
#!/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
}
case "\$1/\$2" in
pre/*)
suspend_dlm
;;
post/*)
resume_dlm
;;
esac
Is this needed in the runit version?