Handle needing to wait for ofonod on first boot
commitce2f370b5bb214a7a8912d6db1120f2433816769
authorMichael Terry <michael.terry@canonical.com>
dateThu 27 Mar 2014, 15:31 (13 years ago)
parentf4ede85
data/CMakeLists.txt+1−1
@@ -16,6 +16,6 @@ install(FILES 51-${GREETER_APP}.conf
1616install(FILES ${GREETER_APP}-wrapper
1717 DESTINATION ${CMAKE_INSTALL_BINDIR}
1818 )
19−install(FILES unity8-greeter-init.conf
19+install(FILES unity8-greeter-init.conf unity8-greeter-ofono.conf
2020 DESTINATION ${CMAKE_INSTALL_DATADIR}/upstart/sessions
2121 )
data/unity8-greeter-init.conf+1−3
@@ -2,10 +2,8 @@ description "Unity 8 Greeter initialization"
22author "Michael Terry <mterry@ubuntu.com>"
33
44start on unity8-greeter-started
5−emits indicator-services-start
65task
76
87script
9− initctl start --no-wait ofono-setup || true
10− initctl start --no-wait maliit-server || true
8+ start --no-wait maliit-server || true
119end 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
33usr/share/lightdm
44usr/share/unity8/GreeterShell.qml
55usr/share/unity8/Greeter
6−usr/share/upstart/sessions/unity8-greeter-init.conf
6+usr/share/upstart/sessions/unity8-greeter-*.conf