1 |
commit: 81ce3ca6fbc4d1e55fcf616c89fd85f2902f85b9 |
2 |
Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat May 11 18:54:12 2019 +0000 |
4 |
Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat May 11 18:54:12 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=81ce3ca6 |
7 |
|
8 |
x11-apps/radeon-profile-daemon: init script: wait for the socket creation |
9 |
|
10 |
Package-Manager: Portage-2.3.66, Repoman-2.3.12 |
11 |
Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org> |
12 |
|
13 |
.../files/radeon-profile-daemon.initd | 16 +++++++++++++++- |
14 |
1 file changed, 15 insertions(+), 1 deletion(-) |
15 |
|
16 |
diff --git a/x11-apps/radeon-profile-daemon/files/radeon-profile-daemon.initd b/x11-apps/radeon-profile-daemon/files/radeon-profile-daemon.initd |
17 |
index f8ec5179670..e67b9843c25 100644 |
18 |
--- a/x11-apps/radeon-profile-daemon/files/radeon-profile-daemon.initd |
19 |
+++ b/x11-apps/radeon-profile-daemon/files/radeon-profile-daemon.initd |
20 |
@@ -8,6 +8,20 @@ command="/usr/sbin/radeon-profile-daemon" |
21 |
command_background="true" |
22 |
pidfile="/run/${SVCNAME}.pid" |
23 |
|
24 |
+radeon_socket="/tmp/radeon-profile-daemon-server" |
25 |
+ |
26 |
+wait_for_socket() { |
27 |
+ local i=0 |
28 |
+ while [ ${i} -lt 10 ]; do |
29 |
+ [ -S "${radeon_socket}" ] && return 0 |
30 |
+ i=$((${i}+1)) |
31 |
+ sleep 1s |
32 |
+ done |
33 |
+ |
34 |
+ return 1 |
35 |
+} |
36 |
+ |
37 |
start_post() { |
38 |
- chgrp video /tmp/radeon-profile-daemon-server |
39 |
+ wait_for_socket || return 1 |
40 |
+ chgrp video ${radeon_socket} |
41 |
} |