on xenial help sign in
Handle needing to wait for ofonod on first boot
ce2f370Michael Terry
data/CMakeLists.txt+1−1
@@ -16,6 +16,6 @@ install(FILES 51-${GREETER_APP}.conf
16install(FILES ${GREETER_APP}-wrapper
16install(FILES ${GREETER_APP}-wrapper
17 DESTINATION ${CMAKE_INSTALL_BINDIR}
17 DESTINATION ${CMAKE_INSTALL_BINDIR}
18 )
18 )
19−install(FILES unity8-greeter-init.conf
19+install(FILES unity8-greeter-init.conf unity8-greeter-ofono.conf
20 DESTINATION ${CMAKE_INSTALL_DATADIR}/upstart/sessions
20 DESTINATION ${CMAKE_INSTALL_DATADIR}/upstart/sessions
21 )
21 )
data/unity8-greeter-init.conf+1−3
@@ -2,10 +2,8 @@ description "Unity 8 Greeter initialization"
2author "Michael Terry <mterry@ubuntu.com>"
2author "Michael Terry <mterry@ubuntu.com>"
3
3
4start on unity8-greeter-started
4start on unity8-greeter-started
5−emits indicator-services-start
6task
5task
7
6
8script
7script
9− initctl start --no-wait ofono-setup || true
10− initctl start --no-wait maliit-server || true
8+ start --no-wait maliit-server || true
11end script
9end script
data/unity8-greeter-ofono.confnew file+22
@@ -0,0 +1,22 @@
1+description "Unity 8 Greeter ofono start"
2+author "Michael Terry <mterry@ubuntu.com>"
3+
4+start on unity8-greeter-started
5+stop on started :sys:ofono
6+task
7+
8+script
9+ # Is ofonod ready?
10+ if pidof onofod >/dev/null; then
11+ stop
12+ else
13+ # Wait 30 seconds. If ofono starts earlier, upstart will kill us.
14+ # If 30 seconds go by, try starting ofono-setup anyway, but it will
15+ # probably fail.
16+ sleep 30
17+ fi
18+end script
19+
20+post-stop script
21+ start --no-wait ofono-setup
22+end script
debian/unity8-greeter.install+1−1
@@ -3,4 +3,4 @@ usr/bin/unity8-greeter-wrapper
3usr/share/lightdm
3usr/share/lightdm
4usr/share/unity8/GreeterShell.qml
4usr/share/unity8/GreeterShell.qml
5usr/share/unity8/Greeter
5usr/share/unity8/Greeter
6−usr/share/upstart/sessions/unity8-greeter-init.conf
6+usr/share/upstart/sessions/unity8-greeter-*.conf