on xenial help sign in
Fix restart unity8 from inside the phone more than two times
e2e5c10Albert Astals Cid
data/unity8.conf+6−6
@@ -16,12 +16,12 @@ pre-start script
16 initctl set-env UNITY_MIR_EMITS_SIGSTOP=1
16 initctl set-env UNITY_MIR_EMITS_SIGSTOP=1
17
17
18 if [ -n "$MIR_SOCKET" ]; then
18 if [ -n "$MIR_SOCKET" ]; then
19− if [ -z "$UNITY_MIR_SOCKET" ]; then
19+ # FIXME Create an autopilot test that makes sure start+stop and restart
20+ # work fine at least 2 times
20− # Save original value of MIR_SOCKET in case we are restarted,
21+ # Save original value of MIR_SOCKET in case we are stopped,
21− # as we modify the variable for future jobs, including ourself.
22+ # as we modify the variable for future jobs, including ourself.
22− UNITY_MIR_SOCKET=$MIR_SOCKET
23+ UNITY_MIR_SOCKET=$(initctl get-env --global MIR_SOCKET)
23− initctl set-env --global UNITY_MIR_SOCKET=$UNITY_MIR_SOCKET
24+ initctl set-env --global UNITY_MIR_SOCKET=$UNITY_MIR_SOCKET
24− fi
25
25
26 # Point unity8 at unity-system-compositor
26 # Point unity8 at unity-system-compositor
27 MIR_SERVER_FILE=$XDG_RUNTIME_DIR/mir_socket
27 MIR_SERVER_FILE=$XDG_RUNTIME_DIR/mir_socket