Merge lp:~jamesodhunt/ubuntu/natty/upstart/proposed-stage2 into lp:ubuntu/natty/upstart
- Natty (11.04)
- proposed-stage2
- Merge into natty
Status: | Merged |
---|---|
Merged at revision: | 1304 |
Proposed branch: | lp:~jamesodhunt/ubuntu/natty/upstart/proposed-stage2 |
Merge into: | lp:ubuntu/natty/upstart |
Diff against target: |
491 lines (+162/-86) 8 files modified
ChangeLog (+12/-0) NEWS (+5/-0) configure.ac (+1/-1) debian/changelog (+21/-0) debian/manpages/upstart-events.7 (+73/-66) init/tests/test_control.c (+4/-1) po/upstart.pot (+2/-2) scripts/initctl2dot.py (+44/-16) |
To merge this branch: | bzr merge lp:~jamesodhunt/ubuntu/natty/upstart/proposed-stage2 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Colin Watson | Approve | ||
Review via email: mp+54718@code.launchpad.net |
Commit message
Description of the change
* debian/
- Corrected reference to Upstart man page (actually init).
- Changed to using proper troff quotes.
- Escaped dashes in event names.
- Updated date.
- Table 1:
- Improved name.
- Sorted columns: Events, References, and Notes.
- Added unmounted-
* init/tests/
* scripts/
- header(): Change default node to be an event to simplify handling
globs in 'emits' stanzas.
- footer(): Updated for glob event nodes.
- sanitize(): Protect against glob syntax.
- show_event(): Update for glob event nodes.
- show_job(): Explicit specification of record node.
- show_edges(): Handle 'emits' glob syntax.
Colin Watson (cjwatson) : | # |
Preview Diff
1 | === modified file 'ChangeLog' | |||
2 | --- ChangeLog 2011-03-15 16:18:21 +0000 | |||
3 | +++ ChangeLog 2011-03-24 16:01:02 +0000 | |||
4 | @@ -1,3 +1,15 @@ | |||
5 | 1 | 2011-03-24 James Hunt <james.hunt@ubuntu.com> | ||
6 | 2 | |||
7 | 3 | * init/tests/test_control.c: Added comment. | ||
8 | 4 | * scripts/initctl2dot.py: Fixes to handle 'emits' glob syntax: | ||
9 | 5 | - header(): Change default node to be an event to simplify handling | ||
10 | 6 | globs in 'emits' stanzas. | ||
11 | 7 | - footer(): Updated for glob event nodes. | ||
12 | 8 | - sanitize(): Protect against glob syntax. | ||
13 | 9 | - show_event(): Update for glob event nodes. | ||
14 | 10 | - show_job(): Explicit specification of record node. | ||
15 | 11 | - show_edges(): Handle 'emits' glob syntax. | ||
16 | 12 | |||
17 | 1 | 2011-03-15 James Hunt <james.hunt@ubuntu.com> | 13 | 2011-03-15 James Hunt <james.hunt@ubuntu.com> |
18 | 2 | 14 | ||
19 | 3 | * configure.ac: Bump version to 0.9.3. | 15 | * configure.ac: Bump version to 0.9.3. |
20 | 4 | 16 | ||
21 | === modified file 'NEWS' | |||
22 | --- NEWS 2011-03-15 12:15:28 +0000 | |||
23 | +++ NEWS 2011-03-24 16:01:02 +0000 | |||
24 | @@ -1,3 +1,8 @@ | |||
25 | 1 | 0.9.4 2011-03-24 | ||
26 | 2 | |||
27 | 3 | * scripts/initctl2dot.py: Fix to handle 'emits' glob syntax | ||
28 | 4 | which was causing script to fail for upstart-udev-bridge. | ||
29 | 5 | |||
30 | 1 | 0.9.3 2011-03-15 | 6 | 0.9.3 2011-03-15 |
31 | 2 | 7 | ||
32 | 3 | * Added missing emits stanzas for supplied .conf files. | 8 | * Added missing emits stanzas for supplied .conf files. |
33 | 4 | 9 | ||
34 | === modified file 'configure.ac' | |||
35 | --- configure.ac 2011-03-15 12:15:28 +0000 | |||
36 | +++ configure.ac 2011-03-24 16:01:02 +0000 | |||
37 | @@ -1,7 +1,7 @@ | |||
38 | 1 | # Process this file with autoconf to produce a configure script. | 1 | # Process this file with autoconf to produce a configure script. |
39 | 2 | 2 | ||
40 | 3 | AC_PREREQ(2.61) | 3 | AC_PREREQ(2.61) |
42 | 4 | AC_INIT([upstart], [0.9.3], [upstart-devel@lists.ubuntu.com]) | 4 | AC_INIT([upstart], [0.9.4], [upstart-devel@lists.ubuntu.com]) |
43 | 5 | NIH_COPYRIGHT([[Copyright © 2011 Canonical Ltd.]]) | 5 | NIH_COPYRIGHT([[Copyright © 2011 Canonical Ltd.]]) |
44 | 6 | AC_CONFIG_SRCDIR([init/main.c]) | 6 | AC_CONFIG_SRCDIR([init/main.c]) |
45 | 7 | AC_CONFIG_MACRO_DIR([m4]) | 7 | AC_CONFIG_MACRO_DIR([m4]) |
46 | 8 | 8 | ||
47 | === modified file 'debian/changelog' | |||
48 | --- debian/changelog 2011-03-15 12:15:28 +0000 | |||
49 | +++ debian/changelog 2011-03-24 16:01:02 +0000 | |||
50 | @@ -1,3 +1,24 @@ | |||
51 | 1 | upstart (0.9.4-1ubuntu1) natty; urgency=low | ||
52 | 2 | |||
53 | 3 | * debian/manpages/upstart-events.7: | ||
54 | 4 | - Corrected reference to Upstart man page (actually init). | ||
55 | 5 | - Changed to using proper troff quotes. | ||
56 | 6 | - Escaped dashes in event names. | ||
57 | 7 | - Updated date. | ||
58 | 8 | - Table 1: | ||
59 | 9 | - Improved name. | ||
60 | 10 | - Sorted columns: Events, References, and Notes. | ||
61 | 11 | - Added unmounted-remote-filesystems event. | ||
62 | 12 | |||
63 | 13 | -- James Hunt <james.hunt@ubuntu.com> Thu, 24 Mar 2011 14:34:12 +0000 | ||
64 | 14 | |||
65 | 15 | upstart (0.9.4-1) natty; urgency=low | ||
66 | 16 | |||
67 | 17 | * New upstream release 0.9.4: | ||
68 | 18 | - scripts/initctl2dot.py: Fixes to handle 'emits' glob syntax. | ||
69 | 19 | |||
70 | 20 | -- James Hunt <james.hunt@ubuntu.com> Thu, 24 Mar 2011 14:31:26 +0000 | ||
71 | 21 | |||
72 | 1 | upstart (0.9.3-1) natty; urgency=low | 22 | upstart (0.9.3-1) natty; urgency=low |
73 | 2 | 23 | ||
74 | 3 | * New upstream release 0.9.3: | 24 | * New upstream release 0.9.3: |
75 | 4 | 25 | ||
76 | === modified file 'debian/manpages/upstart-events.7' | |||
77 | --- debian/manpages/upstart-events.7 2011-03-04 17:17:18 +0000 | |||
78 | +++ debian/manpages/upstart-events.7 2011-03-24 16:01:02 +0000 | |||
79 | @@ -1,14 +1,16 @@ | |||
80 | 1 | '\" t | 1 | '\" t |
82 | 2 | .TH upstart-events 7 2011-03-04 "Upstart-Events" | 2 | .TH upstart-events 7 2011-03-24 upstart |
83 | 3 | .\" | 3 | .\" |
84 | 4 | .SH NAME | 4 | .SH NAME |
85 | 5 | upstart-events \- Well-known Upstart events summary | 5 | upstart-events \- Well-known Upstart events summary |
86 | 6 | .\" | 6 | .\" |
87 | 7 | .SH Event Summary | 7 | .SH Event Summary |
88 | 8 | 8 | ||
92 | 9 | This manual page summarizes well-known \fBUpstart\fP(8) events. It is | 9 | This manual page summarizes well-known events generated by the Upstart |
93 | 10 | not an exhaustive list of all possible events, but rather details a | 10 | .BR init (8) |
94 | 11 | standard set of events expected to be generated on any Ubuntu system | 11 | daemon. |
95 | 12 | It is not an exhaustive list of all possible events, but rather details | ||
96 | 13 | a standard set of events expected to be generated on any Ubuntu system | ||
97 | 12 | running Upstart. | 14 | running Upstart. |
98 | 13 | 15 | ||
99 | 14 | The primary table, \fBTable 1\fP, encodes the well-known events, along | 16 | The primary table, \fBTable 1\fP, encodes the well-known events, along |
100 | @@ -20,11 +22,11 @@ | |||
101 | 20 | The \fIRef\fP (Reference) column is used to refer to individual | 22 | The \fIRef\fP (Reference) column is used to refer to individual |
102 | 21 | events succinctly in the \fITime\fP column. | 23 | events succinctly in the \fITime\fP column. |
103 | 22 | 24 | ||
105 | 23 | Note that the \'<\' and \'>\' characters in the \fITime\fP column denote | 25 | Note that the \(aq<\(aq and \(aq>\(aq characters in the \fITime\fP column denote |
106 | 24 | that the event in the \fIEvent\fP column occurs respectively before or | 26 | that the event in the \fIEvent\fP column occurs respectively before or |
107 | 25 | after the event specified in the \fITime\fP column (for example, the | 27 | after the event specified in the \fITime\fP column (for example, the |
108 | 26 | \fBmounting\fP(7) event occurs "at some time" after the \fBstartup\fP(7) | 28 | \fBmounting\fP(7) event occurs "at some time" after the \fBstartup\fP(7) |
110 | 27 | event, and the \fBvirtual-filesystems\fP(7) event occurs after the last | 29 | event, and the \fBvirtual\-filesystems\fP(7) event occurs after the last |
111 | 28 | \fBmounted\fP(7) event relating to a virtual filesystem has been emitted). | 30 | \fBmounted\fP(7) event relating to a virtual filesystem has been emitted). |
112 | 29 | 31 | ||
113 | 30 | For further details on events, consult the manual pages and the job | 32 | For further details on events, consult the manual pages and the job |
114 | @@ -38,47 +40,52 @@ | |||
115 | 38 | .po 0 | 40 | .po 0 |
116 | 39 | .in 0 | 41 | .in 0 |
117 | 40 | .sp 1 | 42 | .sp 1 |
119 | 41 | \fBTable 1: Event Summary.\fP | 43 | \fBTable 1: Well-Known Event Summary.\fP |
120 | 42 | .TS | 44 | .TS |
121 | 43 | box, tab (@); | 45 | box, tab (@); |
122 | 44 | c | c | c | c | c | c | 46 | c | c | c | c | c | c |
123 | 45 | c | l | c | c | l | c. | 47 | c | l | c | c | l | c. |
124 | 46 | Ref@Event@Type@Emit@Time@Note | 48 | Ref@Event@Type@Emit@Time@Note |
125 | 47 | = | 49 | = |
153 | 48 | 1@\fBstartup\fP(7)@S@I@Boot@A | 50 | @\fBall\-swaps\fP@S@M@> (5)@ |
154 | 49 | 2@\fBmounting\fP(7)@H@M@> (1)@B | 51 | @\fBcontrol\-alt\-delete\fP(7)@S@A@> (5)@A |
155 | 50 | 3@\fBmounted\fP(7)@H@M@> associated (2)@C | 52 | @dbus\-activation@S@B@> D\-Bus client request@ |
156 | 51 | 4@\fBvirtual-filesystems\fP(7)@S@M@> last virtual FS (3)@D | 53 | @desktop\-session\-start@H@D@> \fBX\fP(7) session created@B |
157 | 52 | @\fBlocal-filesystems\fP(7)@S@M@> (4)@ | 54 | @drm\-device\-added@S@U@> (5)@C |
158 | 53 | @\fBremote-filesystems\fP(7)@S@M@> (4)@ | 55 | @\fBfilesystem\fP@S@M@After last (1)@D |
159 | 54 | @\fBfilesystem\fP@S@M@After last (3)@E | 56 | @graphics\-device\-added@S@U@> (5)@C |
160 | 55 | @\fBall-swaps\fP@S@M@> (1)@ | 57 | @\fBkeyboard\-request\fP(7)@S@A@> (5)@E |
161 | 56 | @\fBcontrol-alt-delete\fP(7)@S@A@> (1)@F | 58 | @\fBlocal\-filesystems\fP(7)@S@M@> (6)@ |
162 | 57 | @\fBkeyboard-request\fP(7)@S@A@> (1)@G | 59 | @login\-session\-start@H@D@< DM running@F |
163 | 58 | @\fBpower-status-changed\fP(7)@S@I@> (1)@H | 60 | 1@\fBmounted\fP(7)@H@M@> associated (2)@G |
164 | 59 | @\fBrunlevel\fP(7)@M@T@> (1)@ | 61 | 2@\fBmounting\fP(7)@H@M@> (5)@H |
165 | 60 | @login-session-start@H@D@< DM running@I | 62 | 3@net\-device\-added@S@U@> (5)@C |
166 | 61 | @desktop-session-start@H@D@> \fBX\fP(7) session created@J | 63 | @net\-device\-changed@S@U@> (5)@C |
167 | 62 | 5@net-device-added@S@U@> (1)@K | 64 | @net\-device\-down@S@F@< (4)@C |
168 | 63 | @net-device-changed@S@U@> (1)@K | 65 | 4@net\-device\-removed@S@U@> (5)@C |
169 | 64 | 6@net-device-removed@S@U@> (1)@K | 66 | @net\-device\-up@S@F,N@> (3)@C |
170 | 65 | @net-device-up@S@F,N@> (5)@K | 67 | @\fBpower\-\%status\-\%changed\fP(7)@S@I@> (5)@I |
171 | 66 | @net-device-down@S@F@< (6)@K | 68 | @\fBremote\-\%filesystems\fP(7)@S@M@> (6)@ |
172 | 67 | @drm-device-added@S@U@> (1)@K | 69 | @\fBrunlevel\fP(7)@M@T@> (5)@ |
173 | 68 | @graphics-device-added@S@U@> (1)@K | 70 | @\fBsocket\fP(7)@S@S@> socket connection@ |
174 | 69 | @\fBstarting\fP(7)@H@I@< job starts@L | 71 | 5@\fBstartup\fP(7)@S@I@Boot@J |
175 | 70 | @\fBstarted\fP(7)@S@I@> job started@L | 72 | @\fBstarted\fP(7)@S@I@> job started@K |
176 | 71 | @\fBstopping\fP(7)@H@I@< job stops@L | 73 | @\fBstarting\fP(7)@H@I@< job starts@K |
177 | 72 | @\fBstopped\fP(7)@S@I@> job stopped@L | 74 | @\fBstopped\fP(7)@S@I@> job stopped@K |
178 | 73 | @\fBsocket\fP(7)@S@I@> socket connection@ | 75 | @\fBstopping\fP(7)@H@I@< job stops@K |
179 | 74 | @dbus-activation@S@B@> D-Bus client request@ | 76 | @T{ |
180 | 77 | unmounted\-\:remote\-\:filesystems | ||
181 | 78 | T}@H@V@T{ | ||
182 | 79 | > last remote FS unmounted | ||
183 | 80 | T}@L | ||
184 | 81 | 6@\fBvirtual\-\:filesystems\fP(7)@S@M@> last virtual FS (1)@M | ||
185 | 75 | .TE | 82 | .TE |
186 | 76 | .po \n[old_po] | 83 | .po \n[old_po] |
187 | 77 | .in \n[old_in] | 84 | .in \n[old_in] |
188 | 78 | .P | 85 | .P |
189 | 79 | Key: | 86 | Key: |
192 | 80 | \'FS\' is an abbreviation for filesystem. | 87 | \(aqFS\(aq is an abbreviation for filesystem. |
193 | 81 | \'DM\' is an abbreviation for Display Manager. | 88 | \(aqDM\(aq is an abbreviation for Display Manager. |
194 | 82 | 89 | ||
195 | 83 | .\" | 90 | .\" |
196 | 84 | .P | 91 | .P |
197 | @@ -119,15 +126,16 @@ | |||
198 | 119 | Ref@Emitter@Notes | 126 | Ref@Emitter@Notes |
199 | 120 | = | 127 | = |
200 | 121 | A@System Administrator (initiator)@Technically emitted by init(8). | 128 | A@System Administrator (initiator)@Technically emitted by init(8). |
202 | 122 | B@\fBdbus-daemon\fP(1)@Run with "\fI--activation=upstart"\fP | 129 | B@\fBdbus\-daemon\fP(1)@Run with "\fI\-\-activation=upstart"\fP |
203 | 123 | D@Display Manager@e.g. gdm/kdm/xdm. | 130 | D@Display Manager@e.g. gdm/kdm/xdm. |
204 | 124 | F@\fBifup\fP(8) or \fBifdown\fP(8)@See \fI/etc/network/\fP. | 131 | F@\fBifup\fP(8) or \fBifdown\fP(8)@See \fI/etc/network/\fP. |
205 | 125 | I@\fBinit\fP(8)@ | 132 | I@\fBinit\fP(8)@ |
206 | 126 | M@\fBmountall\fP(8)@ | 133 | M@\fBmountall\fP(8)@ |
209 | 127 | N@network-interface job@ | 134 | N@network\-interface job@ |
210 | 128 | S@\fBupstart-socket-bridge\fP(8)@ | 135 | S@\fBupstart\-socket\-bridge\fP(8)@ |
211 | 129 | T@\fBtelinit\fP(8), \fBshutdown\fP(8)@ | 136 | T@\fBtelinit\fP(8), \fBshutdown\fP(8)@ |
213 | 130 | U@\fBupstart-udev-bridge\fP(8)@ | 137 | U@\fBupstart\-udev\-bridge\fP(8)@ |
214 | 138 | V@System V init system@ | ||
215 | 131 | .TE | 139 | .TE |
216 | 132 | .po \n[old_po] | 140 | .po \n[old_po] |
217 | 133 | .in \n[old_in] | 141 | .in \n[old_in] |
218 | @@ -145,42 +153,41 @@ | |||
219 | 145 | c | l. | 153 | c | l. |
220 | 146 | Note@Detail | 154 | Note@Detail |
221 | 147 | = | 155 | = |
231 | 148 | A@Initial event. | 156 | A@T{ |
223 | 149 | B@T{ | ||
224 | 150 | Emitted when mount attempt for single entry from \fBfstab\fP(5) | ||
225 | 151 | for any filesystem type is about to begin. | ||
226 | 152 | T} | ||
227 | 153 | C@Generated for each mount that completes successfully. | ||
228 | 154 | D@Emitted when all virtual filesystems (such as \fI/proc\fR) mounted. | ||
229 | 155 | E@Note this is in the singular - there is no \'filesystems\' event. | ||
230 | 156 | F@T{ | ||
232 | 157 | Requires administrator to press Control-Alt-Delete key | 157 | Requires administrator to press Control-Alt-Delete key |
233 | 158 | combination on the console. | 158 | combination on the console. |
234 | 159 | T} | 159 | T} |
236 | 160 | G@T{ | 160 | B@Event generated when user performs graphical login. |
237 | 161 | C@T{ | ||
238 | 162 | These are specific examples. \fBupstart\-udev\-bridge\fP(8) will emit | ||
239 | 163 | events which match the pattern, "\fIS\fP\-device\-\fIA\fP" where | ||
240 | 164 | \(aqS\(aq is the udev \fIsubsystem\fP and \(aqA\(aq is the udev \fIaction\fP. See | ||
241 | 165 | \fBudev\fP(7) and for further details. If you have sysfs | ||
242 | 166 | mounted, you can look in \fI/sys/class/\fP for possible values for subsystem. | ||
243 | 167 | T} | ||
244 | 168 | D@Note this is in the singular - there is no \(aqfilesystems\(aq event. | ||
245 | 169 | E@T{ | ||
246 | 161 | Emitted when administrator presses Alt-UpArrow key combination on | 170 | Emitted when administrator presses Alt-UpArrow key combination on |
247 | 162 | the console. | 171 | the console. |
248 | 163 | T} | 172 | T} |
251 | 164 | H@Emitted when Upstart receives the SIGPWR signal. | 173 | F@T{ |
250 | 165 | I@T{ | ||
252 | 166 | Denotes Display Manager running (about to be displayed), but no users | 174 | Denotes Display Manager running (about to be displayed), but no users |
253 | 167 | logged in yet. | 175 | logged in yet. |
254 | 168 | T} | 176 | T} |
257 | 169 | 177 | G@Generated for each mount that completes successfully. | |
258 | 170 | J@Event generated when user performs graphical login. | 178 | H@T{ |
259 | 179 | Emitted when mount attempt for single entry from \fBfstab\fP(5) | ||
260 | 180 | for any filesystem type is about to begin. | ||
261 | 181 | T} | ||
262 | 182 | I@Emitted when Upstart receives the SIGPWR signal. | ||
263 | 183 | J@Initial event. | ||
264 | 171 | K@T{ | 184 | K@T{ |
265 | 172 | These are specific examples. \fBupstart-udev-bridge\fP(8) will emit | ||
266 | 173 | events which match the pattern, "\fIS\fP-device-\fIA\fP" where \'S\' is | ||
267 | 174 | the udev \fIsubsystem\fP and \'A\' is the udev \fIaction\fP. See | ||
268 | 175 | \fBudev\fP(7) and for further details. If you have | ||
269 | 176 | .BR sysfs (2) | ||
270 | 177 | mounted, you can look in \fI/sys/class/\fP for possible values for subsystem. | ||
271 | 178 | T} | ||
272 | 179 | L@T{ | ||
273 | 180 | Although the events are emmitted by \fBinit\fP(8), the instigator may be | 185 | Although the events are emmitted by \fBinit\fP(8), the instigator may be |
274 | 181 | \fBinitctl\fP(8) if a System Administrator has manually started or | 186 | \fBinitctl\fP(8) if a System Administrator has manually started or |
275 | 182 | stopped a job. | 187 | stopped a job. |
276 | 183 | T} | 188 | T} |
277 | 189 | L@\fI/etc/init/umountnfs.sh\fP. | ||
278 | 190 | M@Emitted when all virtual filesystems (such as \fI/proc\fR) mounted. | ||
279 | 184 | .TE | 191 | .TE |
280 | 185 | .po \n[old_po] | 192 | .po \n[old_po] |
281 | 186 | .in \n[old_in] | 193 | .in \n[old_in] |
282 | @@ -193,7 +200,7 @@ | |||
283 | 193 | Upstart emits the \fBstarting\fP(7) event denoting the job is | 200 | Upstart emits the \fBstarting\fP(7) event denoting the job is |
284 | 194 | "about to start". The \fBstarting\fP(7) event completes. | 201 | "about to start". The \fBstarting\fP(7) event completes. |
285 | 195 | .IP \n+[step] 3 | 202 | .IP \n+[step] 3 |
287 | 196 | If the \fBpre-start\fP stanza exists, the pre-start process is | 203 | If the \fBpre\-start\fP stanza exists, the pre\-start process is |
288 | 197 | spawned. | 204 | spawned. |
289 | 198 | .IP \n+[step] 3 | 205 | .IP \n+[step] 3 |
290 | 199 | Upstart spawns the main process. | 206 | Upstart spawns the main process. |
291 | @@ -202,7 +209,7 @@ | |||
292 | 202 | descendent of the immediate child process if \fBexpect fork\fP or | 209 | descendent of the immediate child process if \fBexpect fork\fP or |
293 | 203 | \fBexpect daemon\fP has been specified. | 210 | \fBexpect daemon\fP has been specified. |
294 | 204 | .IP \n+[step] 3 | 211 | .IP \n+[step] 3 |
296 | 205 | If the \fBpost-start\fP stanza exists, the post-start process is | 212 | If the \fBpost\-start\fP stanza exists, the post\-start process is |
297 | 206 | spawned. | 213 | spawned. |
298 | 207 | .IP \n+[step] 3 | 214 | .IP \n+[step] 3 |
299 | 208 | Upstart emits the \fBstarted\fP(7) event. | 215 | Upstart emits the \fBstarted\fP(7) event. |
300 | @@ -214,7 +221,7 @@ | |||
301 | 214 | 221 | ||
302 | 215 | .nr step 1 1 | 222 | .nr step 1 1 |
303 | 216 | .IP \n[step] 3 | 223 | .IP \n[step] 3 |
305 | 217 | If the \fBpre-stop\fP stanza exists, the pre-stop process is | 224 | If the \fBpre\-stop\fP stanza exists, the pre\-stop process is |
306 | 218 | spawned. | 225 | spawned. |
307 | 219 | .IP \n+[step] 3 | 226 | .IP \n+[step] 3 |
308 | 220 | The main process is stopped: | 227 | The main process is stopped: |
309 | @@ -234,7 +241,7 @@ | |||
310 | 234 | .IP \n+[step] 3 | 241 | .IP \n+[step] 3 |
311 | 235 | Upstart emits the \fBstopping\fP(7) event. | 242 | Upstart emits the \fBstopping\fP(7) event. |
312 | 236 | .IP \n+[step] 3 | 243 | .IP \n+[step] 3 |
314 | 237 | If the \fBpost-stop\fP stanza exists, the post-stop process is | 244 | If the \fBpost\-stop\fP stanza exists, the post\-stop process is |
315 | 238 | spawned. | 245 | spawned. |
316 | 239 | .IP \n+[step] 3 | 246 | .IP \n+[step] 3 |
317 | 240 | Upstart emits the \fBstopped\fP(7) event. | 247 | Upstart emits the \fBstopped\fP(7) event. |
318 | 241 | 248 | ||
319 | === modified file 'init/tests/test_control.c' | |||
320 | --- init/tests/test_control.c 2011-02-23 09:35:03 +0000 | |||
321 | +++ init/tests/test_control.c 2011-03-24 16:01:02 +0000 | |||
322 | @@ -933,9 +933,12 @@ | |||
323 | 933 | 933 | ||
324 | 934 | strcpy (filename, dirname); | 934 | strcpy (filename, dirname); |
325 | 935 | strcat (filename, "/baz"); | 935 | strcat (filename, "/baz"); |
326 | 936 | |||
327 | 937 | /* XXX: note that this will generate an error message when this | ||
328 | 938 | * test runs sine "/baz" does not exist as a directory. | ||
329 | 939 | */ | ||
330 | 936 | source3 = conf_source_new (NULL, filename, CONF_DIR); | 940 | source3 = conf_source_new (NULL, filename, CONF_DIR); |
331 | 937 | 941 | ||
332 | 938 | |||
333 | 939 | message = nih_new (NULL, NihDBusMessage); | 942 | message = nih_new (NULL, NihDBusMessage); |
334 | 940 | message->connection = NULL; | 943 | message->connection = NULL; |
335 | 941 | message->message = NULL; | 944 | message->message = NULL; |
336 | 942 | 945 | ||
337 | === modified file 'po/upstart.pot' | |||
338 | --- po/upstart.pot 2011-03-15 16:22:27 +0000 | |||
339 | +++ po/upstart.pot 2011-03-24 16:01:02 +0000 | |||
340 | @@ -6,9 +6,9 @@ | |||
341 | 6 | #, fuzzy | 6 | #, fuzzy |
342 | 7 | msgid "" | 7 | msgid "" |
343 | 8 | msgstr "" | 8 | msgstr "" |
345 | 9 | "Project-Id-Version: upstart 0.9.3\n" | 9 | "Project-Id-Version: upstart 0.9.4\n" |
346 | 10 | "Report-Msgid-Bugs-To: new@bugs.launchpad.net\n" | 10 | "Report-Msgid-Bugs-To: new@bugs.launchpad.net\n" |
348 | 11 | "POT-Creation-Date: 2011-03-15 14:08+0000\n" | 11 | "POT-Creation-Date: 2011-03-24 11:26+0000\n" |
349 | 12 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" | 12 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" |
350 | 13 | "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" | 13 | "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" |
351 | 14 | "Language-Team: LANGUAGE <LL@li.org>\n" | 14 | "Language-Team: LANGUAGE <LL@li.org>\n" |
352 | 15 | 15 | ||
353 | === modified file 'scripts/initctl2dot.py' | |||
354 | --- scripts/initctl2dot.py 2011-03-10 14:06:37 +0000 | |||
355 | +++ scripts/initctl2dot.py 2011-03-24 16:01:02 +0000 | |||
356 | @@ -32,12 +32,12 @@ | |||
357 | 32 | # Usage: | 32 | # Usage: |
358 | 33 | # | 33 | # |
359 | 34 | # initctl show-config -e > initctl.out | 34 | # initctl show-config -e > initctl.out |
361 | 35 | # initctl2dot.py -f initctl.out -o upstart.dot | 35 | # initctl2dot -f initctl.out -o upstart.dot |
362 | 36 | # dot -Tpng -o upstart.png upstart.dot | 36 | # dot -Tpng -o upstart.png upstart.dot |
363 | 37 | # | 37 | # |
364 | 38 | # Or more simply: | 38 | # Or more simply: |
365 | 39 | # | 39 | # |
367 | 40 | # initctl2dot.py -o - | dot -Tpng -o upstart.png | 40 | # initctl2dot -o - | dot -Tpng -o upstart.png |
368 | 41 | # | 41 | # |
369 | 42 | # See also: | 42 | # See also: |
370 | 43 | # | 43 | # |
371 | @@ -48,6 +48,7 @@ | |||
372 | 48 | 48 | ||
373 | 49 | import sys | 49 | import sys |
374 | 50 | import re | 50 | import re |
375 | 51 | import fnmatch | ||
376 | 51 | import os | 52 | import os |
377 | 52 | from string import split | 53 | from string import split |
378 | 53 | import datetime | 54 | import datetime |
379 | @@ -78,12 +79,15 @@ | |||
380 | 78 | def header(ofh): | 79 | def header(ofh): |
381 | 79 | global options | 80 | global options |
382 | 80 | 81 | ||
389 | 81 | str = "digraph upstart {" | 82 | str = "digraph upstart {\n" |
390 | 82 | str += " node [shape=record];" | 83 | |
391 | 83 | str += " rankdir=LR;" | 84 | # make the default node an event to simplify glob code |
392 | 84 | str += " overlap=false;" | 85 | str += " node [shape=\"diamond\", fontcolor=\"%s\", fillcolor=\"%s\", style=\"filled\"];\n" \ |
393 | 85 | str += " bgcolor=\"%s\";" % options.color_bg | 86 | % (options.color_event_text, options.color_event) |
394 | 86 | str += " fontcolor=\"%s\";" % options.color_text | 87 | str += " rankdir=LR;\n" |
395 | 88 | str += " overlap=false;\n" | ||
396 | 89 | str += " bgcolor=\"%s\";\n" % options.color_bg | ||
397 | 90 | str += " fontcolor=\"%s\";\n" % options.color_text | ||
398 | 87 | 91 | ||
399 | 88 | ofh.write(str) | 92 | ofh.write(str) |
400 | 89 | 93 | ||
401 | @@ -107,11 +111,12 @@ | |||
402 | 107 | (cmd, os.uname()[1]) | 111 | (cmd, os.uname()[1]) |
403 | 108 | 112 | ||
404 | 109 | epilog += "Boxes of color %s denote jobs.\\n" % options.color_job | 113 | epilog += "Boxes of color %s denote jobs.\\n" % options.color_job |
406 | 110 | epilog += "Diamonds of color %s denote events.\\n" % options.color_event | 114 | epilog += "Solid diamonds of color %s denote events.\\n" % options.color_event |
407 | 115 | epilog += "Dotted diamonds denote 'glob' events.\\n" | ||
408 | 111 | epilog += "Emits denoted by %s lines.\\n" % options.color_emits | 116 | epilog += "Emits denoted by %s lines.\\n" % options.color_emits |
409 | 112 | epilog += "Start on denoted by %s lines.\\n" % options.color_start_on | 117 | epilog += "Start on denoted by %s lines.\\n" % options.color_start_on |
410 | 113 | epilog += "Stop on denoted by %s lines.\\n" % options.color_stop_on | 118 | epilog += "Stop on denoted by %s lines.\\n" % options.color_stop_on |
412 | 114 | epilog += "\";" | 119 | epilog += "\";\n" |
413 | 115 | epilog += "}\n" | 120 | epilog += "}\n" |
414 | 116 | ofh.write(epilog) | 121 | ofh.write(epilog) |
415 | 117 | 122 | ||
416 | @@ -121,7 +126,7 @@ | |||
417 | 121 | def sanitise(s): | 126 | def sanitise(s): |
418 | 122 | return s.replace('-', '_').replace('$', 'dollar_').replace('[', \ | 127 | return s.replace('-', '_').replace('$', 'dollar_').replace('[', \ |
419 | 123 | 'lbracket').replace(']', 'rbracket').replace('!', \ | 128 | 'lbracket').replace(']', 'rbracket').replace('!', \ |
421 | 124 | 'bang').replace(':', '_') | 129 | 'bang').replace(':', '_').replace('*', 'star').replace('?', 'question') |
422 | 125 | 130 | ||
423 | 126 | 131 | ||
424 | 127 | # Convert a dollar in @name to a unique-ish new name, based on @job and | 132 | # Convert a dollar in @name to a unique-ish new name, based on @job and |
425 | @@ -148,10 +153,17 @@ | |||
426 | 148 | 153 | ||
427 | 149 | def show_event(ofh, name): | 154 | def show_event(ofh, name): |
428 | 150 | global options | 155 | global options |
433 | 151 | ofh.write(""" | 156 | str = "%s [label=\"%s\", shape=diamond, fontcolor=\"%s\", fillcolor=\"%s\"," % \ |
434 | 152 | %s [label=\"%s\", shape=diamond, fontcolor=\"%s\", fillcolor=\"%s\", style=\"filled\"]; | 157 | (mk_event_node_name(name), name, options.color_event_text, options.color_event) |
435 | 153 | """ % (mk_event_node_name(name), name, options.color_event_text, options.color_event)) | 158 | |
436 | 154 | 159 | if '*' in name: | |
437 | 160 | str += " style=\"dotted\"" | ||
438 | 161 | else: | ||
439 | 162 | str += " style=\"filled\"" | ||
440 | 163 | |||
441 | 164 | str += "];\n" | ||
442 | 165 | |||
443 | 166 | ofh.write(str) | ||
444 | 155 | 167 | ||
445 | 156 | def show_events(ofh): | 168 | def show_events(ofh): |
446 | 157 | global events | 169 | global events |
447 | @@ -193,7 +205,7 @@ | |||
448 | 193 | global options | 205 | global options |
449 | 194 | 206 | ||
450 | 195 | ofh.write(""" | 207 | ofh.write(""" |
452 | 196 | %s [label=\"<job> %s | { <start> start on | <stop> stop on }\", fontcolor=\"%s\", style=\"filled\", fillcolor=\"%s\"]; | 208 | %s [shape=\"record\", label=\"<job> %s | { <start> start on | <stop> stop on }\", fontcolor=\"%s\", style=\"filled\", fillcolor=\"%s\"]; |
453 | 197 | """ % (mk_job_node_name(name), name, options.color_job_text, options.color_job)) | 209 | """ % (mk_job_node_name(name), name, options.color_job_text, options.color_job)) |
454 | 198 | 210 | ||
455 | 199 | 211 | ||
456 | @@ -288,6 +300,8 @@ | |||
457 | 288 | global options | 300 | global options |
458 | 289 | global restrictions_list | 301 | global restrictions_list |
459 | 290 | 302 | ||
460 | 303 | glob_jobs = {} | ||
461 | 304 | |||
462 | 291 | if restrictions_list: | 305 | if restrictions_list: |
463 | 292 | jobs_list = restrictions_list | 306 | jobs_list = restrictions_list |
464 | 293 | else: | 307 | else: |
465 | @@ -308,6 +322,14 @@ | |||
466 | 308 | show_stop_on_event_edge(ofh, job, s) | 322 | show_stop_on_event_edge(ofh, job, s) |
467 | 309 | 323 | ||
468 | 310 | for e in jobs[job]['emits']: | 324 | for e in jobs[job]['emits']: |
469 | 325 | if '*' in e: | ||
470 | 326 | # handle glob patterns in 'emits' | ||
471 | 327 | glob_events = [] | ||
472 | 328 | for _e in events: | ||
473 | 329 | if e != _e and fnmatch.fnmatch(_e, e): | ||
474 | 330 | glob_events.append(_e) | ||
475 | 331 | glob_jobs[job] = glob_events | ||
476 | 332 | |||
477 | 311 | show_job_emits_edge(ofh, job, e) | 333 | show_job_emits_edge(ofh, job, e) |
478 | 312 | 334 | ||
479 | 313 | if not restrictions_list: | 335 | if not restrictions_list: |
480 | @@ -325,6 +347,12 @@ | |||
481 | 325 | for e in jobs[j]['emits']: | 347 | for e in jobs[j]['emits']: |
482 | 326 | show_job_emits_edge(ofh, j, e) | 348 | show_job_emits_edge(ofh, j, e) |
483 | 327 | 349 | ||
484 | 350 | # Create links from jobs (which advertise they emits a class of | ||
485 | 351 | # events, via the glob syntax) to all the events they create. | ||
486 | 352 | for g in glob_jobs: | ||
487 | 353 | for ge in glob_jobs[g]: | ||
488 | 354 | show_job_emits_edge(ofh, g, ge) | ||
489 | 355 | |||
490 | 328 | if not restrictions_list: | 356 | if not restrictions_list: |
491 | 329 | return | 357 | return |
492 | 330 | 358 |