Merge lp:~jamesodhunt/upstart/add-sample-session-jobs into lp:upstart

Proposed by James Hunt on 2013-07-18
Status: Merged
Merged at revision: 1508
Proposed branch: lp:~jamesodhunt/upstart/add-sample-session-jobs
Merge into: lp:upstart
Diff against target: 81 lines (+47/-0)
5 files modified
ChangeLog (+4/-0)
extra/Makefile.am (+6/-0)
extra/conf-session/re-exec.conf (+6/-0)
extra/conf-session/upstart-event-bridge.conf (+15/-0)
extra/conf-session/upstart-file-bridge.conf (+16/-0)
To merge this branch: bzr merge lp:~jamesodhunt/upstart/add-sample-session-jobs
Reviewer Review Type Date Requested Status
Dimitri John Ledkov 2013-07-18 Approve on 2013-07-18
Review via email: mp+175576@code.launchpad.net

Description of the change

* extra/conf-session/: Addition of example jobs for Session Inits.

To post a comment you must log in.
Dimitri John Ledkov (xnox) wrote :

please merge this.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'ChangeLog'
2--- ChangeLog 2013-07-17 14:21:18 +0000
3+++ ChangeLog 2013-07-18 14:14:31 +0000
4@@ -1,3 +1,7 @@
5+2013-07-18 James Hunt <james.hunt@ubuntu.com>
6+
7+ * extra/conf-session/: Addition of example jobs for Session Inits.
8+
9 2013-07-17 James Hunt <james.hunt@ubuntu.com>
10
11 * init/tests/test_state.c:
12
13=== modified file 'extra/Makefile.am'
14--- extra/Makefile.am 2013-07-05 10:03:36 +0000
15+++ extra/Makefile.am 2013-07-18 14:14:31 +0000
16@@ -15,6 +15,12 @@
17
18 initdir = $(sysconfdir)/init
19
20+sessionsdir = $(datadir)/upstart/sessions
21+
22+dist_sessions_DATA = \
23+ conf-session/upstart-event-bridge.conf \
24+ conf-session/upstart-file-bridge.conf \
25+ conf-session/re-exec.conf
26
27 sbin_PROGRAMS = \
28 upstart-socket-bridge \
29
30=== added directory 'extra/conf-session'
31=== added file 'extra/conf-session/re-exec.conf'
32--- extra/conf-session/re-exec.conf 1970-01-01 00:00:00 +0000
33+++ extra/conf-session/re-exec.conf 2013-07-18 14:14:31 +0000
34@@ -0,0 +1,6 @@
35+description "Restart session init when system init restarts"
36+author "St├ęphane Graber <stgraber@ubuntu.com>"
37+
38+start on :sys:restarted
39+
40+exec dbus-send --type=method_call --address=$UPSTART_SESSION /com/ubuntu/Upstart com.ubuntu.Upstart0_6.Restart
41
42=== added file 'extra/conf-session/upstart-event-bridge.conf'
43--- extra/conf-session/upstart-event-bridge.conf 1970-01-01 00:00:00 +0000
44+++ extra/conf-session/upstart-event-bridge.conf 2013-07-18 14:14:31 +0000
45@@ -0,0 +1,15 @@
46+# upstart-event-bridge - Bridge system upstarts events into session upstart
47+#
48+# This helper daemon receives system upstart events from the DBus system bus
49+# and emits equivalent events (with a :sys:) prefix to the session bus
50+
51+description "Bridge Upstart system events into session Upstart"
52+
53+emits :sys:*
54+
55+start on started dbus
56+stop on stopped dbus
57+
58+respawn
59+
60+exec upstart-event-bridge
61
62=== added file 'extra/conf-session/upstart-file-bridge.conf'
63--- extra/conf-session/upstart-file-bridge.conf 1970-01-01 00:00:00 +0000
64+++ extra/conf-session/upstart-file-bridge.conf 2013-07-18 14:14:31 +0000
65@@ -0,0 +1,16 @@
66+# upstart-file-bridge - Bridge file events into upstart
67+#
68+# This helper daemon receives inotify(7) events and
69+# emits equivalent Upstart events.
70+
71+description "Bridge file events into upstart"
72+
73+emits file
74+
75+start on startup
76+stop on session-end
77+
78+expect daemon
79+respawn
80+
81+exec upstart-file-bridge --daemon --user

Subscribers

People subscribed via source and target branches