mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-09-24 04:59:14 -07:00
x11-apps/radeon-profile-daemon: init script: wait for the socket creation
Package-Manager: Portage-2.3.66, Repoman-2.3.12 Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>
This commit is contained in:
@@ -8,6 +8,20 @@ command="/usr/sbin/radeon-profile-daemon"
|
||||
command_background="true"
|
||||
pidfile="/run/${SVCNAME}.pid"
|
||||
|
||||
start_post() {
|
||||
chgrp video /tmp/radeon-profile-daemon-server
|
||||
radeon_socket="/tmp/radeon-profile-daemon-server"
|
||||
|
||||
wait_for_socket() {
|
||||
local i=0
|
||||
while [ ${i} -lt 10 ]; do
|
||||
[ -S "${radeon_socket}" ] && return 0
|
||||
i=$((${i}+1))
|
||||
sleep 1s
|
||||
done
|
||||
|
||||
return 1
|
||||
}
|
||||
|
||||
start_post() {
|
||||
wait_for_socket || return 1
|
||||
chgrp video ${radeon_socket}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user